Public Types | |
| enum | RasterOp { Copy, XOR } |
| A raster transfer mode. More... | |
Public Member Functions | |
| this (int width, int height) | |
| Create a bitmap. | |
| bit | inRange (int x, int y) |
| Determine whether this point is in-range. | |
| bit | inRangeX (int x) |
| Determine whether the horizontal coordinate is in-range. | |
| bit | inRangeY (int y) |
| Determine whether the vertical coordinate is in-range. | |
| Color | get (int x, int y) |
| Read a pixel from the bitmap. | |
| Color | getx (int x, int y) |
| Read a pixel from the bitmap, assuming it's in-range. | |
| void | set (int x, int y, Color c) |
| Store a pixel in the bitmap. | |
| void | hseto (int sx, int y, Color[] colors) |
| Set a horizontal row on the bitmap, no blending. | |
| int | width () |
| The width of the bitmap in pixels. | |
| int | height () |
| The height of the bitmap in pixels. | |
| void | clear (Color c) |
| Clear to a single color. | |
| void | rect (int sx, int sy, int ex, int ey, Brush brush) |
| Draw a rectangle on the bitmap using pen around the edges and brush inside. | |
| void | outlineRect (int sx, int sy, int ex, int ey, Brush brush) |
| Draw an outline rectangle, inclusive. | |
| void | hline (int sx, int y, int ex, Brush brush) |
| Draw a horizontal line, inclusive. | |
| void | vline (int x, int sy, int ey, Brush brush) |
| Draw a vertical line, inclusive. | |
| void | arect (int sx, int sy, int ex, int ey, Color color) |
| Draw a non-blended filled rectangle. | |
| void | polygon (float p[], Brush brush) |
| Draw a filled polygon using a single loop. | |
| void | line (float sx, float sy, float ex, float ey, Brush brush) |
| Draw a line on the bitmap using the current pen. | |
| void | blit (Canvas canvas, int x, int y) |
| Blit the bitmap onto the canvas. | |
| void | blit (Canvas canvas, int x, int y, RasterOp mode) |
| Blit the bitmap onto the canvas. | |
| void | blit (Canvas canvas, int x, int y, int sourcex, int sourcey, int width, int height) |
| Blit the bitmap onto the canvas, specifying the region to blit from. | |
| void | blit (Canvas canvas, int x, int y, int sourcex, int sourcey, int width, int height, RasterOp mode) |
| Blit the bitmap onto the canvas, specifying the region to blit from. | |
| void | stretchBlit (Canvas canvas, int dx, int dy, int dw, int dh, int sx, int sy, int sw, int sh) |
| Blit contents of this bitmap onto the canvas while stretching its dimensions. | |
| void | stretchBlit (Canvas canvas, int dx, int dy, int dw, int dh) |
| Blit the entire contents of this bitmap onto the canvas while stretching its dimensions. | |
| void | stretchBlit (Bitmap dest, int dx, int dy, int dw, int dh, int sx, int sy, int sw, int sh) |
| Blit contents of this bitmap on another bitmap while stretching its dimensions. | |
| void | circlePoint (inout float[] points, float px, float py, float x, float y, float w, float h, float a, float b) |
| Create the set of points for a circle, recursively subdividing as needed to handle non-linear distortions. | |
| void | circle (float x, float y, float radius, Brush brush) |
| Call circle (x, y, radius, radius, brush). | |
| void | circle (float x, float y, float w, float h, Brush brush) |
| Draw an ellipse on the bitmap. | |
| ubyte * | row (int x, int y) |
| Return pointer to this row's data. | |
| void | boundx (inout int x) |
| If x is out-of-range, saturate it to the edges. | |
| void | boundy (inout int y) |
| If y is out-of-range, saturate it to the edges. | |
| void | bound (inout int x, inout int y) |
| If x or y are out-of-range, saturate them to the edges. | |
Static Public Member Functions | |
| void | store (ubyte *data, Color color) |
| Store a color into a data pointer. | |
| void | storeinc (inout ubyte *data, Color color) |
| Store a color into a data point and increment the pointer. | |
| Color | retrieve (ubyte *data) |
| Retrieve a color from a data pointer. | |
| Color | retrieveinc (inout ubyte *data) |
| Retrieve a color from a data pointer and increment the pointer. | |
Public Attributes | |
| const int | bytesPerPixel = 4 |
| The number of bytes to a pixel. | |
| Contorter | contort |
| The contorter to use for polygon points and pixels rendered to the bitmap. | |
Related Functions | |
| (Note that these are not member functions.) | |
| Bitmap | BitmapLoad (char[] filename, Stream stream) |
| Read an image file from a stream and return a bitmap. | |
|
|
A raster transfer mode.
|
|
||||||||||||||||||||||||||||||||||||
|
Blit the bitmap onto the canvas, specifying the region to blit from. The canvas must be in between a beginPaint/endPaint pair. The alpha channel is ignored in the blit, which means if the bitmap is partially transparent the colors could come out oddly (for example, objects drawn on it that had no visual effect will show up). The solution is to either preprocess the bitmap or blit it onto another bitmap first.
|
|
||||||||||||||||||||||||||||||||
|
Blit the bitmap onto the canvas, specifying the region to blit from. The canvas must be in between a beginPaint/endPaint pair. The alpha channel is ignored in the blit, which means if the bitmap is partially transparent the colors could come out oddly (for example, objects drawn on it that had no visual effect will show up). The solution is to either preprocess the bitmap or blit it onto another bitmap first.
|
|
||||||||||||||||||||
|
Blit the bitmap onto the canvas. The canvas must be in between a beginPaint/endPaint pair. The alpha channel is ignored in the blit, which means that if the bitmap is partially transparent the colors could come out oddly (for example, objects drawn on it that had no visual effect will show up). The solution is to either preprocess the bitmap or blit it onto another bitmap first.
|
|
||||||||||||||||
|
Blit the bitmap onto the canvas. The canvas must be in between a beginPaint/endPaint pair. The alpha channel is ignored in the blit, which means that if the bitmap is partially transparent the colors could come out oddly (for example, objects drawn on it that had no visual effect will show up). The solution is to either preprocess the bitmap or blit it onto another bitmap first.
|
|
||||||||||||||||||||||||
|
Draw an ellipse on the bitmap.
|
|
||||||||||||
|
Read a pixel from the bitmap. If out-of-range, this returns black. |
|
||||||||||||||||||||||||
|
Draw a line on the bitmap using the current pen. This creates square caps on the ends of the line.
|
|
||||||||||||
|
Draw a filled polygon using a single loop. This uses odd/even fill mode; a star drawn using five points will have a hollowed-out center. |
|
||||||||||||
|
Return pointer to this row's data. Use store and retrieve to access the values. Does NO bounds checking. |
|
||||||||||||||||
|
Store a pixel in the bitmap. If it's out-of-range, it is ignored. This blends the pixel into the current color. |
|
||||||||||||||||||||||||||||||||||||||||
|
Blit contents of this bitmap on another bitmap while stretching its dimensions. This chooses the nearest point. This is currently poorly implemented and will be very slow.
|
|
||||||||||||||||||||||||
|
Blit the entire contents of this bitmap onto the canvas while stretching its dimensions.
|
|
||||||||||||||||||||||||||||||||||||||||
|
Blit contents of this bitmap onto the canvas while stretching its dimensions.
|
|
||||||||||||
|
Create a bitmap. Make it compatible with the Control and have the specified dimensions. |
|
||||||||||||
|
Read an image file from a stream and return a bitmap. filename will be used for error messages only. |
1.3.2