MCPcopy Create free account
hub / github.com/defold/defold / Flip

Function Flip

engine/texc/src/texc.cpp:84–96  ·  view source on GitHub ↗

Flips a texture

Source from the content-addressed store, hash-verified

82
83 // Flips a texture
84 bool Flip(Image* image, FlipAxis flip_axis)
85 {
86 switch(flip_axis)
87 {
88 case FLIP_AXIS_Y: FlipImageY_RGBA8888((uint32_t*)image->m_Data, image->m_Width, image->m_Height);
89 return true;
90 case FLIP_AXIS_X: FlipImageX_RGBA8888((uint32_t*)image->m_Data, image->m_Width, image->m_Height);
91 return true;
92 default:
93 dmLogError("Unexpected flip direction: %d", flip_axis);
94 return false;
95 }
96 }
97
98 // Dithers a texture
99 bool Dither(Image* image, PixelFormat pixel_format)

Callers 6

Java_TexcLibraryJni_FlipFunction · 0.70
DoEncodeFunction · 0.50
engine.cppFile · 0.50
StepFrameFunction · 0.50
TEST_FFunction · 0.50
TEST_PFunction · 0.50

Calls 2

FlipImageY_RGBA8888Function · 0.85
FlipImageX_RGBA8888Function · 0.85

Tested by 2

TEST_FFunction · 0.40
TEST_PFunction · 0.40