MCPcopy Create free account
hub / github.com/MyGUI/mygui / set

Method set

MyGUIEngine/src/MyGUI_ResourceTrueTypeFont.cpp:198–222  ·  view source on GitHub ↗

Sets a pixel in _dest as 4 or 2 bytes: L8L8L8A8 if LAMode is false, or L8A8 if LAMode is true. Sets luminance from _source if both FromSource and Antialias are true; otherwise, uses the specified value. Sets alpha from _source if FromSource is true; otherwise, uses the specified value. Automatically advances _source just past the pixel read if FromSource is true. Automatically advances _dest just

Source from the content-addressed store, hash-verified

196 // Automatically advances _source just past the pixel read if FromSource is true.
197 // Automatically advances _dest just past the pixel written.
198 static void set(uint8*& _dest, uint8 _luminance, uint8 _alpha, uint8*& _source)
199 {
200 if constexpr (FromSource)
201 {
202 (void)_alpha;
203 if constexpr (Antialias)
204 {
205 (void)_luminance;
206 // Sets the destination pixel using both the luminance and alpha from the specified source.
207 PixelBase<LAMode>::set(_dest, *_source, *_source);
208 }
209 else
210 {
211 // Sets the destination pixel using the specified _luminance and alpha from the specified source.
212 PixelBase<LAMode>::set(_dest, _luminance, *_source);
213 }
214 ++_source;
215 }
216 else
217 {
218 (void)_source;
219 // Sets the destination pixel using the specified luminance and alpha. Source is ignored.
220 PixelBase<LAMode>::set(_dest, _luminance, _alpha);
221 }
222 }
223 };
224 }
225

Callers

nothing calls this directly

Calls 1

setFunction · 0.50

Tested by

no test coverage detected