Mikroelektronika MIKROE-724 データシート

ページ / 726
mikroBasic PRO for dsPIC30/33 and PIC24
MikroElektronika
579
T6963C_PartialImage
T6963C_sprite
Prototype
sub procedure T6963C_PartialImage(dim x_left, y_top, width, height, picture_
width, picture_height as word, const image as ^byte)
Description Displays a partial area of the image on a desired location.
Parameters 
x_left
: x coordinate of the desired location (upper left coordinate). 
y_top
: y coordinate of the desired location (upper left coordinate). 
width
: desired image width. 
height
: desired image height. 
picture_width
: width of the original image. 
picture_height
: height of the original image. 
image
: image to be displayed. Bitmap array can be located in both code and RAM memory (due to 
the mikroBasic PRO for PIC pointer to const and pointer to RAM equivalency). 
Returns
Nothing.
Requires
Toshiba Glcd module needs to be initialized. See T6963C_init routine.
Example
‘ Draws a 10x15 part of the image starting from the upper left corner on the 
coordinate (10,12). Original image size is 16x32. 
T6963C_PartialImage(10, 12, 10, 15, 16, 32, @image)
Notes
Image dimension must match the display dimension.
Use the integrated Glcd Bitmap Editor (menu option 
Tools › Glcd Bitmap Editor) to convert image to 
a constant array suitable for displaying on Glcd.
Prototype
sub procedure T6963C_sprite(dim px, py as byte, dim const pic as ^byte, dim 
sx, sy as byte)
Description Fills graphic rectangle area (px, py) to (px+sx, py+sy) with custom size picture.
Parameters 
px
: x coordinate of the upper left picture corner. Valid values: multiples of the font width 
py
: y coordinate of the upper left picture corner 
pic
: picture to be displayed 
sx
: picture width. Valid values: multiples of the font width 
sy
: picture height 
Returns
Nothing.
Requires
Toshiba Glcd module needs to be initialized. See the T6963C_init routine.
Example
T6963C_sprite(76, 4, einstein, 88, 119) ‘ draw a sprite
Notes
If 
px
 and 
sx
 parameters are not multiples of the font width they will be scaled to the nearest lower 
number that is a multiple of the font width.