BitmapSize
From MCS Wiki AVR
(Difference between revisions)
(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=...") |
|||
Line 76: | Line 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]] |
Latest revision as of 22:04, 12 December 2014
Contents |
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
BitmapHandle, BitmapLayout, BitmapSource
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
'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
' 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
' 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
Languages | English |
---|