MCPcopy Create free account
hub / github.com/dborth/fceugx / SetPixel

Method SetPixel

source/gui/gui_image.cpp:141–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139}
140
141void GuiImage::SetPixel(int x, int y, GXColor color)
142{
143 if(!image || this->GetWidth() <= 0 || x < 0 || y < 0)
144 return;
145
146 u32 offset = (((y >> 2)<<4)*this->GetWidth()) + ((x >> 2)<<6) + (((y%4 << 2) + x%4 ) << 1);
147 *(image+offset) = color.a;
148 *(image+offset+1) = color.r;
149 *(image+offset+32) = color.g;
150 *(image+offset+33) = color.b;
151}
152
153void GuiImage::SetStripe(int s)
154{

Callers 1

GuiImageMethod · 0.95

Calls 1

GetWidthMethod · 0.45

Tested by

no test coverage detected