| Package | km.display |
| Class | public class PixelScreen |
| Inheritance | PixelScreen flash.display.Bitmap |
import km.display.*;
var ps:PixelScreen = new PixelScreen(480,212);
addChild(ps);
ps.color(0xe3ffa3);
ps.locate(2,2);
ps.print('12:54 / -01:12');
ps.pset(50,50);
| Method | Defined by | ||
|---|---|---|---|
|
PixelScreen(width:int, height:int, backgroundColor:uint = 0, transparent:Boolean = false)
| PixelScreen | ||
|
cls():void
Clears the screen.
| PixelScreen | ||
|
color(color:uint):void
Sets the forground color.
| PixelScreen | ||
|
locate(column:int, row:int):void
Set location for next print command.
| PixelScreen | ||
|
preset(x:int, y:int):void
Reset a pixel with the background color.
| PixelScreen | ||
|
print(text:String = ""):void
Print text to screen.
| PixelScreen | ||
|
pset(x:int, y:int, color:uint = 0):void
Set a pixel.
If color is omitted, the color last set with the color() command will be used. | PixelScreen | ||
|
setPixelFont(pixelFont:BitmapData, charWidth:int, charHeight:int):void
Set the pixel font to use.
The first character in the font image has to be char code 32 (space). | PixelScreen | ||
| PixelScreen | () | constructor |
public function PixelScreen(width:int, height:int, backgroundColor:uint = 0, transparent:Boolean = false)Parameters
width:int |
|
height:int |
|
backgroundColor:uint (default = 0) |
|
transparent:Boolean (default = false) |
| cls | () | method |
public function cls():voidClears the screen.
| color | () | method |
public function color(color:uint):voidSets the forground color.
Parameterscolor:uint |
| locate | () | method |
public function locate(column:int, row:int):voidSet location for next print command.
Parameterscolumn:int |
|
row:int |
| preset | () | method |
public function preset(x:int, y:int):voidReset a pixel with the background color.
Parametersx:int |
|
y:int |
| () | method |
public function print(text:String = ""):voidPrint text to screen.
Parameterstext:String (default = "") |
| pset | () | method |
public function pset(x:int, y:int, color:uint = 0):void Set a pixel.
If color is omitted, the color last set with the color() command will be used.
x:int |
|
y:int |
|
color:uint (default = 0) |
| setPixelFont | () | method |
public function setPixelFont(pixelFont:BitmapData, charWidth:int, charHeight:int):void Set the pixel font to use.
The first character in the font image has to be char code 32 (space).
pixelFont:BitmapData |
|
charWidth:int |
|
charHeight:int |