|
March 17th, 2008, 19:38 Posted By: wraggster
dridri85 posted this news/release:
Let me present version of my dev LibGraphicEngine.
Types of variables
Color ==> Color
Two options for defining a COlor possible:
An integer on 32bits, instance => 0xff0000ff (red here)
Or less barbaric => COLOR_RGBA (R, G, B, A) values ranging from 0 to 255
Ge_Image ==> image, structure almost equal to that of the libpng
Basic functions
GeInit () ==> Sets library
GeQuit () ==> Close Bookstore
GeSetClearColor (Color color) ==> defined erasure color screen (left alpha (A) 255)
GeClearScreen () ==> clears the screen
GeSwapBuffers () == flip screen
Ge_Image * geLoadImage (const char * file) ==> loads a file in JPG or PNG pointer ge_Image
GeSwizzle (* ge_Image image) ==> swizzle an image, a process that is reorganizing the "data" of an image into blocks, the display is up to 2x faster. But a picture "swizzlée" can be shown that alpha mode
Image functions
GeDrawLine (x0 int, int y0, int x1, int y1, destination * Color, color int, int width, int w, int h) ==> draws a line on destination
X0, y0 => position of the first point
X0, y0 => position of the second point
Color => color of the line
Destination => destination drawing for a picture put mon_image-> data "for the screen is" SCREEN_DEST "
Width => line width of the destination (for an image is its own width, the screen is 512)
W and h => width and height of the surface of destination
GeDrawHLine (x0 int, int x1, int y, * dest Color, Color color, width int, int w, int h) ==> draws line on the screen
X0 and x1 => points of arrival and destination
Y => vertical placement of the line
For the rest it's the same as DrawLine
GeDawVLine (y0 int, int y1, int x, * dest Color, Color color, height int, int w, int h) ==> vertical line drawing on the screen
Y0 and y1 => points of arrival and destination
X => horizontal placement of the line
For the rest it's the same as DrawLine
GeImageAddColorKey (* ge_Image image, Color color) ==> adds a ColorKey (color) images
The ColorKeys are very practical functions that serve pretty much like displaying sprites, in fact if you have for example a sprite with pink background, you made a colorKey with the value of the pink and all the pixels of that color will not be displayed
GeImageSetAlpha (* ge_Image image, u8 alpha) ==> alpha change the color of an image, value from 0 to 255 (0 invisble 255 opaque)
GeBlitImage (int x, int y, ge_Image * image, sx int, int sy, ex int, int ey, use_alpha int) ==> displays an image on the screen
X, y => x and y position of the image on the screen
Image => the image in question
Sx, sy => beginning to display pictures, example: you put a 10 sx and left of the image became a 10 pixel (if you do not check)
Ex, ey => width and height of the image to display
Use_alpha => 1 if you want to use the transparency or 0 if you do not want
Use it
Quite simply, adding that include debiting your code:
Code:
# Include <libge/ggraphic.h>
Libs and it is a line of LIBS makefile
Code:
- LGE-LM
Download and Give feedback Via Comments
For more information and downloads, click here!
There are 0 comments - Join In and Discuss Here
|
|