#include <image.h>
Inheritance diagram for image_c:

Public Methods | |
| virtual void | create (ushort x, ushort y) |
| create buffer | |
| virtual bool | load (const char *filename) |
| load an image | |
| void | copy (image_c *src) |
| copy image | |
| void | draw (ushort x, ushort y) |
| draw image on screen | |
| ushort | get_width () const |
| get image width | |
| ushort | get_height () const |
| get image height | |
| virtual const char * | get_pixels () const |
| get image pixel buffer | |
| ulong | get_buffer_len () const |
| get image pixel buffer length | |
| char | get_bpp () const |
| get image bit depth | |
| bool | get_has_alpha () const |
| get image alpha flag | |
| void | stamp (image_c *src, sshort x, sshort y) |
| stamp | |
| void | blt (image_c *src, sshort sx, sshort sy, sshort x, sshort y, sshort w, sshort h) |
| stamp | |
| void | blt_blend (image_c *src, sshort sx, sshort sy, sshort x, sshort y, sshort w, sshort h, sshort blendtype) |
| blit blend | |
| void | color_blend (image_c *src, sshort sx, sshort sy, sshort x, sshort y, sshort w, sshort h, color_t color) |
| color blend | |
| void | crop (sshort x, sshort y, sshort w, sshort h) |
| crop image | |
| void | set_pixel (sshort x, sshort y, color_t color) |
| set a pixel | |
| color_t | get_pixel (sshort x, sshort y) |
| get a pixel | |
| void | vline (sshort x, sshort y, sshort h, color_t color) |
| draw vertical line | |
| void | hline (sshort x, sshort y, sshort w, color_t color) |
| draw horizontal line | |
| void | line (sshort x, sshort y, sshort w, sshort h, color_t color) |
| draw line | |
| void | rectangle (sshort x, sshort y, sshort w, sshort h, color_t color) |
| draw rectangle | |
| void | filled_rectangle (sshort x, sshort y, sshort w, sshort h, color_t color) |
| draw filled rectangle | |
| sshort | draw_char (sshort x, sshort y, uchar c, struct font_s *fnt, color_t color) |
| draw character | |
| sshort | draw_string (sshort x, sshort y, const char *c, struct font_s *fnt, color_t color) |
| draw string | |
| void | mirror_vertical () |
| mirror vertically | |
| void | rgb2yuv () |
| convert from rgb -> yuv | |
| void | yuv2rgb () |
| convert from yuv -> rgb | |
Protected Methods | |
| bool | load_tga_rgb (struct file_s *file) |
| load rgb targa | |
| bool | load_tga_rgbrle (struct file_s *file) |
| load rle-compressed rgb targa | |
| bool | load_tga (const char *filename) |
| load a tga | |
| bool | prepare_blt (image_c *src, sshort &sx, sshort &sy, sshort &x, sshort &y, sshort &w, sshort &h) |
| pepare blit coodinates | |
Protected Attributes | |
| ushort | width |
| width of image | |
| ushort | height |
| height of image | |
| char * | buf |
| the image itself | |
| ulong | buflen |
| size of image in size | |
| bool | hasalpha |
| true if image contains alpha | |
| char | bpp |
| bit depth | |
Definition at line 75 of file image.h.
|
||||||||||||||||||||||||||||||||
|
Alphablends image src onto this image centering it around x and y.
Definition at line 215 of file x_image.cpp. Referenced by uiwindow_c::paint(), uislider_c::paint(), and uicheckbutton_c::paint(). |
|
||||||||||||||||||||||||||||||||||||
|
Blends image src onto this image.
Definition at line 253 of file x_image.cpp. Referenced by uiobject_c::draw(), and uislider_c::paint(). |
|
||||||||||||||||||||||||||||||||||||
|
Blends the given color onto this image using the alpha channel from src. Used by font routines.
Definition at line 356 of file x_image.cpp. |
|
|
Makes this imagea a copy of src.
Definition at line 430 of file x_image.cpp. References SafeDelete. |
|
||||||||||||
|
Initializes the image by creating an empty buffer of the given size.
Definition at line 77 of file x_image.cpp. References INVALID_INDEX, and SafeArrayDelete. Referenced by uiobject_c::resize(), and animation_c::set_framecount(). |
|
||||||||||||||||||||
|
Crops this image to the given rectangle.
Definition at line 457 of file x_image.cpp. References SafeArrayDelete. |
|
||||||||||||
|
Blit's this image onto the screen. Be aware that this is pixel accurate but very slow. If you need speed instead of accuracy create a texture and set its bits to this image.
Definition at line 498 of file x_image.cpp. References INVALID_INDEX. Referenced by uiobject_c::draw(). |
|
||||||||||||||||||||||||
|
Draws a single character onto this image.
Definition at line 711 of file x_image.cpp. References font_s::height, font_s::images, font_s::width, and font_s::widths. |
|
||||||||||||||||||||||||
|
Draws a string on this image.
Definition at line 733 of file x_image.cpp. Referenced by uiwindow_c::paint(), uilabel_c::paint(), uiedit_c::paint(), uicheckbutton_c::paint(), and uibutton_c::paint(). |
|
||||||||||||||||||||||||
|
Draws a filled rectangle.
Definition at line 692 of file x_image.cpp. Referenced by uiwindow_c::paint(), uiobject_c::paint(), and uiedit_c::paint(). |
|
||||||||||||
|
Gets a single pixel from this image. |
|
||||||||||||||||||||
|
Draws a simple horizontal line.
Definition at line 563 of file x_image.cpp. Referenced by uiobject_c::paint(). |
|
||||||||||||||||||||||||
|
Draws an arbitrary line.
Definition at line 592 of file x_image.cpp. |
|
|
Loads an image from file into the buffer.
Definition at line 98 of file x_image.cpp. Referenced by gui_c::gui_c(). |
|
|
Mirrors this image vertically. Definition at line 121 of file x_image.cpp. References SafeArrayDelete. |
|
||||||||||||||||||||||||||||||||
|
Changes the coordinates so that the blit will fit both into this image and the source image. Returns true if any pixels would be transferred and false otherwise.
Definition at line 172 of file x_image.cpp. |
|
||||||||||||||||||||||||
|
Draws a simple rectangle.
Definition at line 671 of file x_image.cpp. Referenced by uiwindow_c::paint(), uiobject_c::paint(), uicheckbutton_c::paint(), and uibutton_c::paint(). |
|
|
Converts the image to yuv color space interpreting color values as rgb. Definition at line 896 of file x_image.cpp. |
|
||||||||||||||||
|
Sets a single pixel in this image to color.
Definition at line 955 of file x_image.cpp. |
|
||||||||||||||||
|
Alphablends image src onto this image centering it around x and y.
Definition at line 158 of file x_image.cpp. |
|
||||||||||||||||||||
|
Draws a simple vertical line.
Definition at line 533 of file x_image.cpp. Referenced by uiobject_c::paint(), and uiedit_c::paint(). |
|
|
Converts the image to rgb color space interpreting color values as yuv. Definition at line 925 of file x_image.cpp. |
1.2.18