71 platform->getVideo()->getImageRenderer()->destroyTexture(
texture);
80 platform->getVideo()->getImageRenderer()->destroyTexture(
texture);
101 platform->getVideo()->getImageRenderer()->destroyTexture(
texture);
106 texture = platform->getVideo()->getImageRenderer()->createTexture(w, h);
107 platform->getVideo()->getImageRenderer()->loadTextureData(
texture, img, w, h);
126 platform->getVideo()->getImageRenderer()->destroyTexture(
texture);
159 int currLeft = this->
getLeft();
160 int thisTop = this->
getTop();
167 platform->getVideo()->getImageRenderer()->drawRectangle(currLeft, thisTop,
width,
height, c);
173 for(
int i=0; i<
tile; ++i)
186 for(
int y=0; y < thisHeight; y+=6)
187 platform->getVideo()->getImageRenderer()->drawRectangle(currLeft, thisTop+y, thisWidth, 3, (
PixelColor){0, 0, 0, (uint8_t)
stripe});
Umbrella header for the platform-agnostic libgui core.
bool isVisible()
Checks whether or not the element is visible.
int getTop()
Gets the current topmost coordinate of the element Considers vertical alignment, y offset,...
float getScaleX()
Gets the element's current x scale Considers scale, scaleDyn, and the parent element's GetScale() val...
int alpha
Element alpha value (0-255)
int height
Element height.
float getScaleY()
Gets the element's current y scale Considers scale, scaleDyn, and the parent element's GetScale() val...
void updateEffects()
Updates the element's effects (dynamic values) Called by Draw(), used for animation purposes.
int getWidth()
Gets the current width of the element.
int getLeft()
Gets the current leftmost coordinate of the element Considers horizontal alignment,...
int getHeight()
Gets the height of the element.
int getAlpha()
Gets the element's alpha value Considers alpha, alphaDyn, and the parent element's GetAlpha() value.
Decodes compressed image data (PNG) into a platform-native texture created from it.
void * getTexture()
Gets the attached platform-native texture.
int getWidth()
Gets the image width.
int getHeight()
Gets the image height.
int stripe
Alpha value (0-255) to apply a stripe effect to the texture.
bool ownsTexture
Whether this object created texture itself (TEXTURE/COLOR) or borrowed it from a GuiImageData.
void setTile(int t)
Sets the number of times to draw the image horizontally.
void * texture
Attached platform-native texture.
PixelColor baseColor
Stored color for IMAGE::COLOR types.
void setAngle(float a)
Sets the image rotation angle for drawing.
IMAGE imgType
Type of image data (TEXTURE, COLOR)
void setTexture(uint8_t *tex, int w, int h)
This is an overloaded member function, provided for convenience. It differs from the above function o...
float imageangle
Angle to draw the image.
void setImage(GuiImageData *img)
Sets up a new image using the GuiImageData object specified.
void draw() override
Constantly called to draw the image.
void setStripe(int s)
Sets a stripe effect on the image, overlaying alpha blended rectangles Does not alter the image data.
int tile
Number of times to draw (tile) the image horizontally.
8-bit-per-channel RGBA color used by the video interfaces.
uint8_t a
Alpha component.