MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / Bitmap

Method Bitmap

LibLemon/src/gui/widgets.cpp:319–323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

317 //////////////////////////
318
319 Bitmap::Bitmap(rect_t _bounds) : Widget(_bounds) {
320 surface.buffer = (uint8_t*)malloc(fixedBounds.size.x*fixedBounds.size.y*4);
321 surface.width = fixedBounds.size.x;
322 surface.height = fixedBounds.size.y;
323 }
324
325 Bitmap::Bitmap(rect_t _bounds, surface_t* surf) : Widget({_bounds.pos, (vector2i_t){surf->width, surf->height}}){
326 surface = *surf;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected