跳转至

lib/graphic/widget/base_support/image.h

Image widget for rendering bitmap graphics. More...

Classes

Name
struct CCGraphic_Image

Functions

Name
void CFBDGraphic_InitImage(CCGraphic_Image * image, CFBDGraphic_Point * tl_point, CFBDGraphicSize * image_size, uint8_t * sources_register)
void CFBDGraphic_DrawImage(CFBD_GraphicDevice * handler, CCGraphic_Image * image)
void CFBDGraphic_DrawImageClipped(CFBD_GraphicDevice * device, CCGraphic_Image * image, CFBDGraphicRect * clip_rect)
Draw image with clipping using small fixed buffer (batch processing)

Detailed Description

Image widget for rendering bitmap graphics.

Provides image structures and functions for drawing bitmap data at specified positions on graphics devices. Supports arbitrary bitmap data with configurable size and position.

Functions Documentation

function CFBDGraphic_InitImage

void CFBDGraphic_InitImage(
    CCGraphic_Image * image,
    CFBDGraphic_Point * tl_point,
    CFBDGraphicSize * image_size,
    uint8_t * sources_register
)

function CFBDGraphic_DrawImage

void CFBDGraphic_DrawImage(
    CFBD_GraphicDevice * handler,
    CCGraphic_Image * image
)

function CFBDGraphic_DrawImageClipped

void CFBDGraphic_DrawImageClipped(
    CFBD_GraphicDevice * device,
    CCGraphic_Image * image,
    CFBDGraphicRect * clip_rect
)

Draw image with clipping using small fixed buffer (batch processing)

Parameters:

  • device - Graphic device
  • image - Image to draw
  • clip_rect - Clipping rectangle (viewport bounds)

Note: Uses 64-byte fixed buffer, processes image in columns batches

Source code

#pragma once
#include "base/point.h"
#include "base/rectangle.h"
#include "base/size.h"
#include "cfbd_graphic_define.h"

typedef struct
{
    CFBDGraphic_Point point;

    CFBDGraphicSize image_size;

    uint8_t* sources_register;
} CCGraphic_Image;

void CFBDGraphic_InitImage(CCGraphic_Image* image,
                           CFBDGraphic_Point* tl_point,
                           CFBDGraphicSize* image_size,
                           uint8_t* sources_register);

void CFBDGraphic_DrawImage(CFBD_GraphicDevice* handler, CCGraphic_Image* image);

void CFBDGraphic_DrawImageClipped(CFBD_GraphicDevice* device,
                                  CCGraphic_Image* image,
                                  CFBDGraphicRect* clip_rect);

Updated on 2026-02-03 at 13:21:55 +0000