[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GScript widget for Mac OS X released



Thanks! I can add in myself and modify a bit and make it part of
library.

Will released this later as 1.2 upgrade.

It is just weird with hgr() and vlin() together though! :)

btw, is Lores 16 colors = Apple IIGS 320 mode Super Hires 16 colors?
If not, where can I get the color codes for Lores?

On 8月28日, 上午11时08分, "John B. Matthews" <nos...@nospam.invalid> wrote:

> Yes, I'd be delighted if you did. I wasn't sure how to modify your
> library. I'm guessing something like this:
>
> ...
> var screenWidth = 640;
> var screenHeight = 400;
> var blockWidth = screenWidth / 40;
> var blockHeight = screenHeight / 40;
> ...
> function plot(x, y) {
>     rect(x * blockWidth, y * blockHeight,
>         blockWidth, blockHeight)
>
> }
>
> function hlin(x1, x2, y) {
>     if (x1 <= x2) rect(x1 * blockWidth, y * blockHeight,
>         (x2 - x1 + 1) * blockWidth, blockHeight);
>     else rect(x2 * blockWidth, y * blockHeight,
>         (x1 - x2 + 1) * blockWidth, blockHeight);
>
> }
>
> function vlin(y1, y2, x) {
>     if (y1 <= y2) rect(x * blockWidth, y1 * blockHeight,
>         blockWidth, (y2 - y1 + 1) * blockHeight);
>     else rect(x * blockWidth, y2 * blockHeight,
>         blockWidth, (y1 - y2 + 1) * blockHeight);
>
> }