@@ -95,24 +95,39 @@ class Image : public ::Image {
9595 return ::GenImageGradientH (width, height, left, right);
9696 }
9797
98+ /* *
99+ * Generate image: radial gradient
100+ */
98101 static Image GenGradientRadial (int width, int height, float density,
99102 Color inner, Color outer) {
100103 return ::GenImageGradientRadial (width, height, density, inner, outer);
101104 }
102105
106+ /* *
107+ * Generate image: checked
108+ */
103109 static Image GenChecked (int width, int height, int checksX, int checksY,
104110 Color col1, Color col2) {
105111 return ::GenImageChecked (width, height, checksX, checksY, col1, col2);
106112 }
107113
114+ /* *
115+ * Generate image: white noise
116+ */
108117 static Image GenWhiteNoise (int width, int height, float factor) {
109118 return ::GenImageWhiteNoise (width, height, factor);
110119 }
111120
121+ /* *
122+ * Generate image: perlin noise
123+ */
112124 static Image GenPerlinNoise (int width, int height, int offsetX, int offsetY, float scale) {
113125 return ::GenImagePerlinNoise (width, height, offsetX, offsetY, scale);
114126 }
115127
128+ /* *
129+ * Generate image: cellular algorithm. Bigger tileSize means bigger cells
130+ */
116131 static Image GenCellular (int width, int height, int tileSize) {
117132 return ::GenImageCellular (width, height, tileSize);
118133 }
@@ -288,65 +303,110 @@ class Image : public ::Image {
288303 return *this ;
289304 }
290305
306+ /* *
307+ * Flip image vertically
308+ */
291309 inline Image& FlipVertical () {
292310 ::ImageFlipVertical (this );
293311 return *this ;
294312 }
295313
314+ /* *
315+ * Flip image horizontally
316+ */
296317 inline Image& FlipHorizontal () {
297318 ::ImageFlipHorizontal (this );
298319 return *this ;
299320 }
300321
322+ /* *
323+ * Rotate image clockwise 90deg
324+ */
301325 inline Image& RotateCW () {
302326 ::ImageRotateCW (this );
303327 return *this ;
304328 }
305329
330+ /* *
331+ * Rotate image counter-clockwise 90deg
332+ */
306333 inline Image& RotateCCW () {
307334 ::ImageRotateCCW (this );
308335 return *this ;
309336 }
310337
338+ /* *
339+ * Modify image color: tint
340+ */
311341 inline Image& ColorTint (::Color color = WHITE) {
312342 ::ImageColorTint (this , color);
313343 return *this ;
314344 }
315345
346+ /* *
347+ * Modify image color: invert
348+ */
316349 inline Image& ColorInvert () {
317350 ::ImageColorInvert (this );
318351 return *this ;
319352 }
320353
354+ /* *
355+ * Modify image color: grayscale
356+ */
321357 inline Image& ColorGrayscale () {
322358 ::ImageColorGrayscale (this );
323359 return *this ;
324360 }
325361
362+ /* *
363+ * Modify image color: contrast
364+ *
365+ * @param contrast Contrast values between -100 and 100
366+ */
326367 inline Image& ColorContrast (float contrast) {
327368 ::ImageColorContrast (this , contrast);
328369 return *this ;
329370 }
330371
372+ /* *
373+ * Modify image color: brightness
374+ *
375+ * @param brightness Brightness values between -255 and 255
376+ */
331377 inline Image& ColorBrightness (int brightness) {
332378 ::ImageColorBrightness (this , brightness);
333379 return *this ;
334380 }
335381
382+ /* *
383+ * Modify image color: replace color
384+ */
336385 inline Image& ColorReplace (::Color color, ::Color replace) {
337386 ::ImageColorReplace (this , color, replace);
338387 return *this ;
339388 }
340389
390+ /* *
391+ * Get image alpha border rectangle
392+ *
393+ * @param threshold Threshold is defined as a percentatge: 0.0f -> 1.0f
394+ */
341395 inline Rectangle GetAlphaBorder (float threshold) const {
342396 return ::GetImageAlphaBorder (*this , threshold);
343397 }
344398
399+ /* *
400+ * Clear image background with given color
401+ */
345402 inline Image& ClearBackground (::Color color = WHITE) {
346403 ::ImageClearBackground (this , color);
347404 return *this ;
348405 }
349406
407+ /* *
408+ * Draw pixel within an image
409+ */
350410 inline Image& DrawPixel (int posX, int posY, ::Color color) {
351411 ::ImageDrawPixel (this , posX, posY, color);
352412 return *this ;
0 commit comments