Packagekm.display
Classpublic class PixelScreen
InheritancePixelScreen Inheritance flash.display.Bitmap

The PixelScreen class.
By default a small numeric font (4 x 6 px) will be set.


Example
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);



Public Methods
 MethodDefined 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
Constructor detail
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)
Method detail
cls()method
public function cls():void

Clears the screen.

color()method 
public function color(color:uint):void

Sets the forground color.

Parameters
color:uint
locate()method 
public function locate(column:int, row:int):void

Set location for next print command.

Parameters
column:int
 
row:int
preset()method 
public function preset(x:int, y:int):void

Reset a pixel with the background color.

Parameters
x:int
 
y:int
print()method 
public function print(text:String = ""):void

Print text to screen.

Parameters
text: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.

Parameters
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).

Parameters
pixelFont:BitmapData
 
charWidth:int
 
charHeight:int