LF: Grayscale Putpixel example - Here you go!
[Prev][Next][Index][Thread]
LF: Grayscale Putpixel example - Here you go!
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.
--1900025437-747549852-848678025=:16167
Content-Type: TEXT/PLAIN; charset=US-ASCII
Since several people has asked me how to put pixels on a grayscale
display, I have attached a small example to this message. It's a
simple program that fills the screen with pixels of different color,
but it's pretty well documented.
Be my guest!
//Sasq (Jonas)
--1900025437-747549852-848678025=:16167
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="GRAYNEWB.ASM"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.SUN.3.91N2x.961122165345.16167B@dront.nada.kth.se>
Content-Description:
CUBwcm9ncmFtCXByb2dfY29kZSxwcm9nX25hbWUNDQoNDQo7JSUlJSUlJSUl
JSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUl
JSUlJSUlDQ0KOyUgR3JheXNjYWxlIEV4YW1wbGUgZm9yIE5ld2JpZXMgLSBi
eSBKb25hcyBNaW5uYmVyZyAoU2FzcSkgJQ0NCjslICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICUN
DQo7JSBTaW5jZSBzbyBtYW55IHBlb3BsZSBvbiB0aGUgRmFyZ29MaXN0IGFz
a3MgYWJvdXQgdGhpcywgSSAlDQ0KOyUgcHV0IHRvZ2V0aGVyIGEgc21hbGwg
ZXhhbXBsZSB0aGF0IHlvdSBtYXkgdXNlIGZyZWVseS4gICAgJQ0NCjslIEl0
IHNpbXBseSB1c2VzIGEgcGl4ZWxwbG90IHJvdXRpbmUgZG8gZHJhdyBob3Jp
c29udGFsICAgICUNDQo7JSBsaW5lcyBpbiBkaWZmZXJlbnQgY29sb3JzLiAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAlDQ0KOyUgICAgICAgICAg
ICAgICAgIC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E9TKHBjKSxhMiAgICAgICAgICAg
ICAgO0EyIEhvbGRzIG9mZnNldCB0byBjb29yZGluYXRlcw0NCiAgICAgICAg
Y2xyLmwgICAoYTIpICAgICAgICAgICAgICAgICAgICA7U3RhcnQgYXQgKDAs
MCkNDQogICAgICAgIG1vdmVxICAgIzEyNyxkNiAgICAgICAgICAgICAgICAg
O0xvb3AgaW5kZXggMSwgMTI4IGxpbmVzDQ0KXGxvb3A6DQ0KICAgICAgICBt
b3ZlLncgICAjMjM5LGQ3ICAgICAgICAgICAgICAgIDtMb29wIGluZGV4IDIs
IDI0MCByb3dzDQ0KXGxvb3AyOg0NCiAgICAgICAgbW92ZW0udyAgKGEyKSxk
MC9kMSAgICAgICAgICAgICA7UHV0IChYLFkpIGluIERPICYgRDENDQogICAg
ICAgIGJzciAgICAgcHV0X2dyYXlzY2FsZV9waXhlbCAgICAgO0NhbGwgb3Vy
IHBpeGVscGxvdCByb3V0aW5lDQ0KICAgICAgICBhZGQudyAgICMxLChhMikg
ICAgICAgICAgICAgICAgIDtJbmNyZWFzZSBYIGNvb3JkaW5hdGUNDQogICAg
ICAgIGRiZiAgICAgZDcsXGxvb3AyICAgICAgICAgICAgICAgO0RvIHRoZSAo
SW5uZXIpIExvb3ANDQoNDQogICAgICAgIGNsci53ICAgKGEyKSAgICAgICAg
ICAgICAgICAgICAgO0NsZWFyIFggY29vcmRpbmF0ZSBhbmQuLi4NDQogICAg
ICAgIGFkZC53ICAgIzEsMihhMikgICAgICAgICAgICAgICAgO2luY3JlYXNl
IFkgY29vcmRpbmF0ZQ0NCiAgICAgICAgYWRkcSAgICAjMSxkMyAgICAgICAg
ICAgICAgICAgICA7QWxzbyBpbmNyZWFzZSBjb2xvcnZhbHVlDQ0KICAgICAg
ICBhbmQuYiAgICMkMDMsZDMgICAgICAgICAgICAgICAgIDthbmQgbWFrZSBz
dXJlIGl0J3MgYWx3YXlzIDAtMw0NCiAgICAgICAgZGJmICAgICBkNixcbG9v
cCAgICAgICAgIC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jJDcsZDINDQog
ICAgICAgIGxzci5iICAgIzMsZDANDQogICAgICAgIGFkZC53ICAgZDAsZDEg
ICAgICAgICAgIDtEMSBOb3cgaG9sZHMgb2Zmc2V0IHRvIGJ5dGUNDQogICAg
ICAgIHJ0cw0NCg0NCnBsYW5lMjoNDQogICAgICAgIGRjLmwgICAgMA0NCg0N
CnByb2dfbmFtZToNDQogICAgICAgIGRjLmIgICAgIkdyYXlzY2FsZSBleGFt
cGxlIGZvciBOZXdiaWVzIiwwDQ0KDQ0KOyoqKioqKioqKioqKioqKiBFbmQg
b2YgRmFyZ28gcHJvZ3JhbSAqKioqKioqKioqKioqKioqDQ0KDQ0KCXJlbG9j
X29wZW4NDQogICAgICAgIGFkZF9saWJyYXJ5ICAgICBmbGliDQ0KCWFkZF9s
aWJyYXJ5CWdyYXlsaWINDQoJcmVsb2NfY2xvc2UNDQoJZW5kDQ0K
--1900025437-747549852-848678025=:16167--
References: