BitmapSize

Aus MCS Wiki AVR
(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
(Created page with "= <span class="f_Header">Action</span> = Specify the Screen Drawing Bitmap Size (for the current Bitmap Handle) <span style="font-family: Arial;"> </span> <span style=...")
 
 
Zeile 76: Zeile 76:
  
 
= <span class="f_Header">Example</span> =
 
= <span class="f_Header">Example</span> =
 +
 +
<source lang="bascomavr">
 +
' Pseudocode
 +
 +
' Drawing a 64 x 64 bitmap
 +
BitmapSource 0
 +
BitmapLayout RGB565, 128, 64
 +
BitmapSIZE NEAREST, BORDER, BORDER, 64, 64
 +
Begin_G BITMAPS
 +
Veterx2II 48, 28, 0, 0
 +
</source> [[File:Clip0090.png|center|Clip0090.png]]
 +
 +
<source lang="bascomavr">
 +
'Reducing the size to 32 x 50
 +
BitmapSource 0
 +
BitmapLayout RGB565, 128, 64
 +
BitmapSize NEAREST, BORDER, BORDER, 32, 50
 +
Begin_G BITMAPS
 +
Vertex2II 48, 28, 0, 0
 +
</source> [[File:Clip0091.png|center|Clip0091.png]]
 +
 +
<source lang="bascomavr">
 +
' Using the REPEAT wrap mode to tile the bitmap
 +
BitmapSource 0
 +
BitmapLayout RGB565, 128, 64
 +
BitmapSize NEAREST, REPEAT, REPEAT, 160, 120
 +
Begin_G BITMAPS
 +
Vertex2II 0, 0, 0, 0
 +
</source> [[File:Clip0092.png|center|Clip0092.png]]
 +
 +
<source lang="bascomavr">
 +
' 4X zoom - 128 X 128 - using a bitmap transform
 +
BitmapSource 0
 +
BitmapLayout RGB565, 128, 64
 +
BitmapTransformA 128
 +
BitmapTransformE 128
 +
BitmapSize NEAREST, BORDER,BORDER, 128, 128
 +
Begin_G BITMAPS
 +
Vertex2II 16, 0, 0, 0
 +
</source> [[File:Clip0093.png|center|Clip0093.png]]
 +
 +
 +
 +
{{Languages}}
 +
 +
[[Category:FT800 Commands]]

Aktuelle Version vom 12. Dezember 2014, 22:04 Uhr

Inhaltsverzeichnis

Action

Specify the Screen Drawing Bitmap Size (for the current Bitmap Handle)

 

 

Syntax

BitmapSize Filter, Wrapx , Wrapx ,Width, Height 

 

 

Remarks

Filter

Bitmap Filtering Mode, NEAREST or BILINEAR

Wrapx

Bitmap x wrap mode, REPEAT or BORDER

Wrapx

Bitmap y wrap mode, REPEAT or BORDER

Width

Drawn bitmap Width, in Pixels

Height

Drawn bitmap Height, in Pixels

 

This command controls the drawing of bitmaps: the on-screen size of the bitmap, the behavior for wrapping, and

the filtering function. Please note that if Wrapx or Wrapy is using REPEAT then the corresponding memory layout dimension

(BitmapLayout linestride or height) must be power of two, otherwise the result is undefined.

 

 

See also

BitmapHandleBitmapLayoutBitmapSource

 

 

Example

' Pseudocode
 
' Drawing a 64 x 64 bitmap
BitmapSource 0
BitmapLayout RGB565, 128, 64
BitmapSIZE NEAREST, BORDER, BORDER, 64, 64
Begin_G BITMAPS
Veterx2II 48, 28, 0, 0
Clip0090.png
'Reducing the size to 32 x 50
BitmapSource 0
BitmapLayout RGB565, 128, 64
BitmapSize NEAREST, BORDER, BORDER, 32, 50
Begin_G BITMAPS
Vertex2II 48, 28, 0, 0
Clip0091.png
' Using the REPEAT wrap mode to tile the bitmap
BitmapSource 0
BitmapLayout RGB565, 128, 64
BitmapSize NEAREST, REPEAT, REPEAT, 160, 120
Begin_G BITMAPS
Vertex2II 0, 0, 0, 0
Clip0092.png
' 4X zoom - 128 X 128 - using a bitmap transform
BitmapSource 0
BitmapLayout RGB565, 128, 64
BitmapTransformA 128
BitmapTransformE 128
BitmapSize NEAREST, BORDER,BORDER, 128, 128
Begin_G BITMAPS
Vertex2II 16, 0, 0, 0
Clip0093.png


Languages   English  
Meine Werkzeuge
Namensräume
Varianten
Aktionen
Navigation
Sprache