| CRM64Pro GDK v0.17.0 A free cross-platform game development kit built on top of SDL 3.0

Loading...
Searching...
No Matches
GFX
Graphics modules

## Description

GFX interface providing generic graphics primitives and utilities [v26.05.0].

### Overview

The GFX interface provides a collection of generic graphics methods for drawing primitives and performing color conversions. Drawing methods are optimized for real-time effects when rendering to screens, though rendering to images has different performance characteristics.

### Key features

- Pixel operations: Direct pixel access on images and screens
- Line primitives: Horizontal, vertical and arbitrary line drawing
- Shape primitives: Rectangles, round rectangles, circles, ellipses and polygons
- Fill modes: Outlined and filled variants for all shapes
- Color conversion: Multiple color space transformations

### Pixel operations

Get pixel | Read individual pixel color from an image or screen
Set pixel | Write individual pixel color to an image or screen

### Drawing primitives

Lines | Horizontal line, vertical line and arbitrary line
Rectangle | Outlined and filled rectangle
Round rectangle | Outlined and filled rectangle with rounded corners
Circle | Outlined and filled circle
Ellipse | Outlined and filled ellipse
Polygon | Outlined and filled polygon with arbitrary vertices

### Color conversions

RGB ↔ HSV | Red-Green-Blue to Hue-Saturation-Value
RGB ↔ YUV | Red-Green-Blue to Luminance-Chrominance
RGB ↔ CMYK | Red-Green-Blue to Cyan-Magenta-Yellow-Key
RGB ↔ YCC | Red-Green-Blue to Luminance-Chroma

### Performance considerations

Screen target | Fast enough for real-time effects
Image target | Slower performance; not intended for real-time effects. Occasional use is acceptable, but heavy usage will impact performance

### Best practices

- Prefer rendering to screens over images for real-time drawing effects
- Use horizontal and vertical line methods when applicable, they are faster than arbitrary lines
- Use filled primitives sparingly on images as they are more expensive than outlined versions
- Leverage color conversions for dynamic color manipulation effects (e.g., HSV for hue shifting)
- Pre-render complex shapes to images during loading rather than drawing them every frame
- Access the interface exclusively through Main::IGFX()

Note
  The GFX interface is a singleton, automatically created once Main is instantiated. You can get a reference to this interface using Main::IGFX() method.
  The GFX interface is automatically released when Main::Terminate() is called. At this time, any resource still loaded will be released, avoiding resource leaks.

## Classes
class | CRM64Pro::GFX
| GFX class. More...

## Functions
bool | CRM64Pro::GFX::info (Sint32 iMode=0) override
| Request GFX Interface information.
bool | CRM64Pro::GFX::setSurfacePixel (float fX, float fY, Uint32 iColor, SDL_Surface *pSurf)
| Draw a pixel in a surface.
Uint32 | CRM64Pro::GFX::getSurfacePixel (float fX, float fY, SDL_Surface *pSurf) const
| Get a pixel color from a surface.
bool | CRM64Pro::GFX::setPixel (float fX, float fY, Uint32 iColor, Sint32 idRes=0)
| Draw a pixel.
bool | CRM64Pro::GFX::setPixel (float fX, float fY, Uint8 iR, Uint8 iG, Uint8 iB, Uint8 iA, Sint32 idRes=0)
| Draw a pixel.
Uint32 | CRM64Pro::GFX::getPixel (float fX, float fY, Sint32 idRes=0) const
| Get a pixel color.
bool | CRM64Pro::GFX::lineH (float fX1, float fX2, float fY, Uint32 iColor, Sint32 idRes=0)
| Draw a horizontal line.
bool | CRM64Pro::GFX::lineH (float fX1, float fX2, float fY, Uint8 iR, Uint8 iG, Uint8 iB, Uint8 iA, Sint32 idRes=0)
| Draw a horizontal line.
bool | CRM64Pro::GFX::lineV (float fX, float fY1, float fY2, Uint32 iColor, Sint32 idRes=0)
| Draw a vertical line.
bool | CRM64Pro::GFX::lineV (float fX, float fY1, float fY2, Uint8 iR, Uint8 iG, Uint8 iB, Uint8 iA, Sint32 idRes=0)
| Draw a vertical line.
bool | CRM64Pro::GFX::line (float fX1, float fY1, float fX2, float fY2, Uint32 iColor, Sint32 idRes=0)
| Draw a line.
bool | CRM64Pro::GFX::line (float fX1, float fY1, float fX2, float fY2, Uint8 iR, Uint8 iG, Uint8 iB, Uint8 iA, Sint32 idRes=0)
| Draw a line.
bool | CRM64Pro::GFX::rect (float fX1, float fY1, float fX2, float fY2, Uint32 iColor, Sint32 idRes=0)
| Draw an outlined rectangle.
bool | CRM64Pro::GFX::rect (float fX1, float fY1, float fX2, float fY2, Uint8 iR, Uint8 iG, Uint8 iB, Uint8 iA, Sint32 idRes=0)
| Draw an outlined rectangle.
bool | CRM64Pro::GFX::rectFilled (float fX1, float fY1, float fX2, float fY2, Uint32 iColor, Sint32 idRes=0)
| Draw a filled rectangle.
bool | CRM64Pro::GFX::rectFilled (float fX1, float fY1, float fX2, float fY2, Uint8 iR, Uint8 iG, Uint8 iB, Uint8 iA, Sint32 idRes=0)
| Draw a filled rectangle.
bool | CRM64Pro::GFX::rectRound (float fX1, float fY1, float fX2, float fY2, float fRad, Uint32 iColor, Sint32 idRes=0)
| Draw a round outlined rectangle.
bool | CRM64Pro::GFX::rectRound (float fX1, float fY1, float fX2, float fY2, float fRad, Uint8 iR, Uint8 iG, Uint8 iB, Uint8 iA, Sint32 idRes=0)
| Draw a round outlined rectangle.
bool | CRM64Pro::GFX::rectFilledRound (float fX1, float fY1, float fX2, float fY2, float fRad, Uint32 iColor, Sint32 idRes=0)
| Draw a round filled rectangle.
bool | CRM64Pro::GFX::rectFilledRound (float fX1, float fY1, float fX2, float fY2, float fRad, Uint8 iR, Uint8 iG, Uint8 iB, Uint8 iA, Sint32 idRes=0)
| Draw a round filled rectangle.
bool | CRM64Pro::GFX::arc (float fX, float fY, float fRad, float fStart, float fEnd, Uint32 iColor, Sint32 idRes=0)
| Draw an arc.
bool | CRM64Pro::GFX::arc (float fX, float fY, float fRad, float fStart, float fEnd, Uint8 iR, Uint8 iG, Uint8 iB, Uint8 iA, Sint32 idRes=0)
| Draw an arc.
bool | CRM64Pro::GFX::circle (float fX, float fY, float fRad, Uint32 iColor, Sint32 idRes=0)
| Draw an outlined circle.
bool | CRM64Pro::GFX::circle (float fX, float fY, float fRad, Uint8 iR, Uint8 iG, Uint8 iB, Uint8 iA, Sint32 idRes=0)
| Draw an outlined circle.
bool | CRM64Pro::GFX::circleFilled (float fX, float fY, float fRad, Uint32 iColor, Sint32 idRes=0)
| Draw a filled circle.
bool | CRM64Pro::GFX::circleFilled (float fX, float fY, float fRad, Uint8 iR, Uint8 iG, Uint8 iB, Uint8 iA, Sint32 idRes=0)
| Draw a filled circle.
bool | CRM64Pro::GFX::ellipse (float fX, float fY, float fRadX, float fRadY, Uint32 iColor, Sint32 idRes=0)
| Draw an outlined ellipse.
bool | CRM64Pro::GFX::ellipse (float fX, float fY, float fRadX, float fRadY, Uint8 iR, Uint8 iG, Uint8 iB, Uint8 iA, Sint32 idRes=0)
| Draw an outlined ellipse.
bool | CRM64Pro::GFX::ellipseFilled (float fX, float fY, float fRadX, float fRadY, Uint32 iColor, Sint32 idRes=0)
| Draw a filled ellipse.
bool | CRM64Pro::GFX::ellipseFilled (float fX, float fY, float fRadX, float fRadY, Uint8 iR, Uint8 iG, Uint8 iB, Uint8 iA, Sint32 idRes=0)
| Draw a filled ellipse.
bool | CRM64Pro::GFX::polygon (float *fVX, float *fVY, Sint32 iNV, Uint32 iColor, Sint32 idRes=0)
| Draw an outlined polygon.
bool | CRM64Pro::GFX::polygon (float *fVX, float *fVY, Sint32 iNV, Uint8 iR, Uint8 iG, Uint8 iB, Uint8 iA, Sint32 idRes=0)
| Draw an outlined polygon.
bool | CRM64Pro::GFX::polygonFilled (float *fVX, float *fVY, Sint32 iNV, Uint32 iColor, Sint32 idRes=0)
| Draw a filled polygon.
bool | CRM64Pro::GFX::polygonFilled (float *fVX, float *fVY, Sint32 iNV, Uint8 iR, Uint8 iG, Uint8 iB, Uint8 iA, Sint32 idRes=0)
| Draw a filled polygon.
bool | CRM64Pro::GFX::RGBtoHSV (Uint8 iR, Uint8 iG, Uint8 iB, float *fH, float *fS, float *fV)
| Color conversion from RGB to HSV.
bool | CRM64Pro::GFX::HSVtoRGB (float fH, float fS, float fV, Uint8 *iR, Uint8 *iG, Uint8 *iB)
| Color conversion from HSV to RGB.
bool | CRM64Pro::GFX::RGBtoYUV (Uint8 iR, Uint8 iG, Uint8 iB, Uint8 *iY, Uint8 *iU, Uint8 *iV)
| Color conversion from RGB to YUV.
bool | CRM64Pro::GFX::YUVtoRGB (Uint8 iY, Uint8 iU, Uint8 iV, Uint8 *iR, Uint8 *iG, Uint8 *iB)
| Color conversion from YUV to RGB.
bool | CRM64Pro::GFX::RGBtoCMYK (Uint8 iR, Uint8 iG, Uint8 iB, Uint8 *iC, Uint8 *iM, Uint8 *iY, Uint8 *iK)
| Color conversion from RGB to CMYK.
bool | CRM64Pro::GFX::CMYKtoRGB (Uint8 iC, Uint8 iM, Uint8 iY, Uint8 iK, Uint8 *iR, Uint8 *iG, Uint8 *iB)
| Color conversion from CMYK to RGB.
bool | CRM64Pro::GFX::RGBtoYCC (Uint8 iR, Uint8 iG, Uint8 iB, Uint8 *iY, Uint8 *Cb, Uint8 *Cr)
| Color conversion from RGB to YCC.
bool | CRM64Pro::GFX::YCCtoRGB (Uint8 iY, Uint8 Cb, Uint8 Cr, Uint8 *iR, Uint8 *iG, Uint8 *iB)
| Color conversion from YCC to RGB.

## Function Documentation

## ◆ info()

bool CRM64Pro::GFX::info | ( | Sint32 | iMode = 0 | ) |
| override

Request GFX Interface information.

Writes information to the default log.

Parameters

  iMode | unused for the time being.

Returns
  true on success, or false on failure.

## ◆ setSurfacePixel()

bool CRM64Pro::GFX::setSurfacePixel | ( | float | fX,
|  | float | fY,
|  | Uint32 | iColor,
|  | SDL_Surface * | pSurf )

Draw a pixel in a surface.

Parameters

  fX | X (horizontal) coordinate of the pixel.
  fY | Y (vertical) coordinate of the pixel.
  iColor | The color value of the pixel to draw (0xAARRGGBB).
  pSurf | SDL_Surface pointer.

Returns
  true on success or false on failure.

Note
  For getting maximum performance, there is not any error checking.

## ◆ getSurfacePixel()

Uint32 CRM64Pro::GFX::getSurfacePixel | ( | float | fX,
|  | float | fY,
|  | SDL_Surface * | pSurf ) const

Get a pixel color from a surface.

Parameters

  fX | X (horizontal) coordinate of the pixel.
  fY | Y (vertical) coordinate of the pixel.
  pSurf | SDL_Surface pointer.

Returns
  a 32bits unsigned integer with the value of the pixel value in the surface format.

Note
  For getting maximum performance, there is not any error checking.

## ◆ setPixel() [1/2]

bool CRM64Pro::GFX::setPixel | ( | float | fX,
|  | float | fY,
|  | Uint32 | iColor,
|  | Sint32 | idRes = 0 )

Draw a pixel.

Parameters

  fX | X (horizontal) coordinate of the pixel.
  fY | Y (vertical) coordinate of the pixel.
  iColor | The color value of the pixel to draw (0xRRGGBBAA).
  idRes | a valid screen or image handle. By default it tries to use the default screen.

Returns
  true on success or false on failure.

## ◆ setPixel() [2/2]

bool CRM64Pro::GFX::setPixel | ( | float | fX,
|  | float | fY,
|  | Uint8 | iR,
|  | Uint8 | iG,
|  | Uint8 | iB,
|  | Uint8 | iA,
|  | Sint32 | idRes = 0 )

Draw a pixel.

Parameters

  fX | X (horizontal) coordinate of the pixel.
  fY | Y (vertical) coordinate of the pixel.
  iR | The red color value of the pixel to draw.
  iG | The green color value of the pixel to draw.
  iB | The blue color value of the pixel to draw.
  iA | The alpha value of the pixel to draw.
  idRes | a valid screen or image handle. By default it tries to use the default screen.

Returns
  true on success or false on failure.

## ◆ getPixel()

Uint32 CRM64Pro::GFX::getPixel | ( | float | fX,
|  | float | fY,
|  | Sint32 | idRes = 0 ) const

Get a pixel color.

Parameters

  fX | X (horizontal) coordinate of the pixel.
  fY | Y (vertical) coordinate of the pixel.
  idRes | a valid screen or image handle. By default it tries to use the default screen.

Returns
  a 32bits unsigned integer with the RGBA value of the pixel value.

Note
  This method is a bit slow when accessing to an image handle or VERY slow when doing it on a screen.

## ◆ lineH() [1/2]

bool CRM64Pro::GFX::lineH | ( | float | fX1,
|  | float | fX2,
|  | float | fY,
|  | Uint32 | iColor,
|  | Sint32 | idRes = 0 )

Draw a horizontal line.

Parameters

  fX1 | X coordinate of the first point of the line.
  fX2 | X coordinate of the second point of the line.
  fY | Y coordinate of the points of the line.
  iColor | The color value (0xRRGGBBAA).
  idRes | a valid screen or image handle. By default it tries to use the default screen.

Returns
  true on success or false on failure.

## ◆ lineH() [2/2]

bool CRM64Pro::GFX::lineH | ( | float | fX1,
|  | float | fX2,
|  | float | fY,
|  | Uint8 | iR,
|  | Uint8 | iG,
|  | Uint8 | iB,
|  | Uint8 | iA,
|  | Sint32 | idRes = 0 )

Draw a horizontal line.

Parameters

  fX1 | X coordinate of the first point of the line.
  fX2 | X coordinate of the second point of the line.
  fY | Y coordinate of the points of the line.
  iR | The red color value.
  iG | The green color value.
  iB | The blue color value.
  iA | The alpha value.
  idRes | a valid screen or image handle. By default it tries to use the default screen.

Returns
  true on success or false on failure.

## ◆ lineV() [1/2]

bool CRM64Pro::GFX::lineV | ( | float | fX,
|  | float | fY1,
|  | float | fY2,
|  | Uint32 | iColor,
|  | Sint32 | idRes = 0 )

Draw a vertical line.

Parameters

  fX | X coordinate of the points of the line.
  fY1 | Y coordinate of the first point of the line.
  fY2 | Y coordinate of the second point of the line.
  iColor | The color value (0xRRGGBBAA).
  idRes | a valid screen or image handle. By default it tries to use the default screen.

Returns
  true on success or false on failure.

## ◆ lineV() [2/2]

bool CRM64Pro::GFX::lineV | ( | float | fX,
|  | float | fY1,
|  | float | fY2,
|  | Uint8 | iR,
|  | Uint8 | iG,
|  | Uint8 | iB,
|  | Uint8 | iA,
|  | Sint32 | idRes = 0 )

Draw a vertical line.

Parameters

  fX | X coordinate of the points of the line.
  fY1 | Y coordinate of the first point of the line.
  fY2 | Y coordinate of the second point of the line.
  iR | The red color value.
  iG | The green color value.
  iB | The blue color value.
  iA | The alpha value.
  idRes | a valid screen or image handle. By default it tries to use the default screen.

Returns
  true on success or false on failure.

## ◆ line() [1/2]

bool CRM64Pro::GFX::line | ( | float | fX1,
|  | float | fY1,
|  | float | fX2,
|  | float | fY2,
|  | Uint32 | iColor,
|  | Sint32 | idRes = 0 )

Draw a line.

Parameters

  fX1 | X coordinate of the first point of the line.
  fY1 | Y coordinate of the first point of the line.
  fX2 | X coordinate of the second point of the line.
  fY2 | Y coordinate of the second point of the line.
  iColor | The color value (0xRRGGBBAA).
  idRes | a valid screen or image handle. By default it tries to use the default screen.

Returns
  true on success or false on failure.

## ◆ line() [2/2]

bool CRM64Pro::GFX::line | ( | float | fX1,
|  | float | fY1,
|  | float | fX2,
|  | float | fY2,
|  | Uint8 | iR,
|  | Uint8 | iG,
|  | Uint8 | iB,
|  | Uint8 | iA,
|  | Sint32 | idRes = 0 )

Draw a line.

Parameters

  fX1 | X coordinate of the first point of the line.
  fY1 | Y coordinate of the first point of the line.
  fX2 | X coordinate of the second point of the line.
  fY2 | Y coordinate of the second point of the line.
  iR | The red color value.
  iG | The green color value.
  iB | The blue color value.
  iA | The alpha value.
  idRes | a valid screen or image handle. By default it tries to use the default screen.

Returns
  true on success or false on failure.

## ◆ rect() [1/2]

bool CRM64Pro::GFX::rect | ( | float | fX1,
|  | float | fY1,
|  | float | fX2,
|  | float | fY2,
|  | Uint32 | iColor,
|  | Sint32 | idRes = 0 )

Draw an outlined rectangle.

Parameters

  fX1 | X coordinate of the first point of the rectangle.
  fY1 | Y coordinate of the first point of the rectangle.
  fX2 | X coordinate of the second point of the rectangle.
  fY2 | Y coordinate of the second point of the rectangle.
  iColor | The color value (0xRRGGBBAA).
  idRes | a valid screen or image handle. By default it tries to use the default screen.

Returns
  true on success or false on failure.

## ◆ rect() [2/2]

bool CRM64Pro::GFX::rect | ( | float | fX1,
|  | float | fY1,
|  | float | fX2,
|  | float | fY2,
|  | Uint8 | iR,
|  | Uint8 | iG,
|  | Uint8 | iB,
|  | Uint8 | iA,
|  | Sint32 | idRes = 0 )

Draw an outlined rectangle.

Parameters

  fX1 | X coordinate of the first point of the rectangle.
  fY1 | Y coordinate of the first point of the rectangle.
  fX2 | X coordinate of the second point of the rectangle.
  fY2 | Y coordinate of the second point of the rectangle.
  iR | The red color value.
  iG | The green color value.
  iB | The blue color value.
  iA | The alpha value.
  idRes | a valid screen or image handle. By default it tries to use the default screen.

Returns
  true on success or false on failure.

## ◆ rectFilled() [1/2]

bool CRM64Pro::GFX::rectFilled | ( | float | fX1,
|  | float | fY1,
|  | float | fX2,
|  | float | fY2,
|  | Uint32 | iColor,
|  | Sint32 | idRes = 0 )

Draw a filled rectangle.

Parameters

  fX1 | X coordinate of the first point of the rectangle.
  fY1 | Y coordinate of the first point of the rectangle.
  fX2 | X coordinate of the second point of the rectangle.
  fY2 | Y coordinate of the second point of the rectangle.
  iColor | The color value (0xRRGGBBAA).
  idRes | a valid screen or image handle. By default it tries to use the default screen.

Returns
  true on success or false on failure.

## ◆ rectFilled() [2/2]

bool CRM64Pro::GFX::rectFilled | ( | float | fX1,
|  | float | fY1,
|  | float | fX2,
|  | float | fY2,
|  | Uint8 | iR,
|  | Uint8 | iG,
|  | Uint8 | iB,
|  | Uint8 | iA,
|  | Sint32 | idRes = 0 )

Draw a filled rectangle.

Parameters

  fX1 | X coordinate of the first point of the rectangle.
  fY1 | Y coordinate of the first point of the rectangle.
  fX2 | X coordinate of the second point of the rectangle.
  fY2 | Y coordinate of the second point of the rectangle.
  iR | The red color value.
  iG | The green color value.
  iB | The blue color value.
  iA | The alpha value.
  idRes | a valid screen or image handle. By default it tries to use the default screen.

Returns
  true on success or false on failure.

## ◆ rectRound() [1/2]

bool CRM64Pro::GFX::rectRound | ( | float | fX1,
|  | float | fY1,
|  | float | fX2,
|  | float | fY2,
|  | float | fRad,
|  | Uint32 | iColor,
|  | Sint32 | idRes = 0 )

Draw a round outlined rectangle.

Parameters

  fX1 | X coordinate of the first point of the rectangle.
  fY1 | Y coordinate of the first point of the rectangle.
  fX2 | X coordinate of the second point of the rectangle.
  fY2 | Y coordinate of the second point of the rectangle.
  fRad | Radius in pixels of the corner arc.
  iColor | The color value (0xRRGGBBAA).
  idRes | a valid screen or image handle. By default it tries to use the default screen.

Returns
  true on success or false on failure.

## ◆ rectRound() [2/2]

bool CRM64Pro::GFX::rectRound | ( | float | fX1,
|  | float | fY1,
|  | float | fX2,
|  | float | fY2,
|  | float | fRad,
|  | Uint8 | iR,
|  | Uint8 | iG,
|  | Uint8 | iB,
|  | Uint8 | iA,
|  | Sint32 | idRes = 0 )

Draw a round outlined rectangle.

Parameters

  fX1 | X coordinate of the first point of the rectangle.
  fY1 | Y coordinate of the first point of the rectangle.
  fX2 | X coordinate of the second point of the rectangle.
  fY2 | Y coordinate of the second point of the rectangle.
  fRad | Radius in pixels of the corner arc.
  iR | The red color value.
  iG | The green color value.
  iB | The blue color value.
  iA | The alpha value.
  idRes | a valid screen or image handle. By default it tries to use the default screen.

Returns
  true on success or false on failure.

## ◆ rectFilledRound() [1/2]

bool CRM64Pro::GFX::rectFilledRound | ( | float | fX1,
|  | float | fY1,
|  | float | fX2,
|  | float | fY2,
|  | float | fRad,
|  | Uint32 | iColor,
|  | Sint32 | idRes = 0 )

Draw a round filled rectangle.

Parameters

  fX1 | X coordinate of the first point of the rectangle.
  fY1 | Y coordinate of the first point of the rectangle.
  fX2 | X coordinate of the second point of the rectangle.
  fY2 | Y coordinate of the second point of the rectangle.
  fRad | Radius in pixels of the corner arc.
  iColor | The color value (0xRRGGBBAA).
  idRes | a valid screen or image handle. By default it tries to use the default screen.

Returns
  true on success or false on failure.

## ◆ rectFilledRound() [2/2]

bool CRM64Pro::GFX::rectFilledRound | ( | float | fX1,
|  | float | fY1,
|  | float | fX2,
|  | float | fY2,
|  | float | fRad,
|  | Uint8 | iR,
|  | Uint8 | iG,
|  | Uint8 | iB,
|  | Uint8 | iA,
|  | Sint32 | idRes = 0 )

Draw a round filled rectangle.

Parameters

  fX1 | X coordinate of the first point of the rectangle.
  fY1 | Y coordinate of the first point of the rectangle.
  fX2 | X coordinate of the second point of the rectangle.
  fY2 | Y coordinate of the second point of the rectangle.
  fRad | Radius in pixels of the corner arc.
  iR | The red color value.
  iG | The green color value.
  iB | The blue color value.
  iA | The alpha value.
  idRes | a valid screen or image handle. By default it tries to use the default screen.

Returns
  true on success or false on failure.

## ◆ arc() [1/2]

bool CRM64Pro::GFX::arc | ( | float | fX,
|  | float | fY,
|  | float | fRad,
|  | float | fStart,
|  | float | fEnd,
|  | Uint32 | iColor,
|  | Sint32 | idRes = 0 )

Draw an arc.

Parameters

  fX | X coordinate of the center of the arc.
  fY | Y coordinate of the center of the arc.
  fRad | Radius in pixels of the arc.
  fStart | Starting radius in degrees of the arc. 0 degrees is down, increasing counterclockwise.
  fEnd | Ending radius in degrees of the arc. 0 degrees is down, increasing counterclockwise.
  iColor | The color value (0xRRGGBBAA).
  idRes | a valid screen or image handle. By default it tries to use the default screen.

Returns
  true on success or false on failure.

## ◆ arc() [2/2]

bool CRM64Pro::GFX::arc | ( | float | fX,
|  | float | fY,
|  | float | fRad,
|  | float | fStart,
|  | float | fEnd,
|  | Uint8 | iR,
|  | Uint8 | iG,
|  | Uint8 | iB,
|  | Uint8 | iA,
|  | Sint32 | idRes = 0 )

Draw an arc.

Parameters

  fX | X coordinate of the center of the arc.
  fY | Y coordinate of the center of the arc.
  fRad | Radius in pixels of the arc.
  fStart | Starting radius in degrees of the arc. 0 degrees is down, increasing counterclockwise.
  fEnd | Ending radius in degrees of the arc. 0 degrees is down, increasing counterclockwise.
  iR | The red color value.
  iG | The green color value.
  iB | The blue color value.
  iA | The alpha value.
  idRes | a valid screen or image handle. By default it tries to use the default screen.

Returns
  true on success or false on failure.

## ◆ circle() [1/2]

bool CRM64Pro::GFX::circle | ( | float | fX,
|  | float | fY,
|  | float | fRad,
|  | Uint32 | iColor,
|  | Sint32 | idRes = 0 )

Draw an outlined circle.

Parameters

  fX | X coordinate of the center of the circle.
  fY | Y coordinate of the center of the circle.
  fRad | Radius in pixels of the circle.
  iColor | The color value (0xRRGGBBAA).
  idRes | a valid screen or image handle. By default it tries to use the default screen.

Returns
  true on success or false on failure.

## ◆ circle() [2/2]

bool CRM64Pro::GFX::circle | ( | float | fX,
|  | float | fY,
|  | float | fRad,
|  | Uint8 | iR,
|  | Uint8 | iG,
|  | Uint8 | iB,
|  | Uint8 | iA,
|  | Sint32 | idRes = 0 )

Draw an outlined circle.

Parameters

  fX | X coordinate of the center of the circle.
  fY | Y coordinate of the center of the circle.
  fRad | Radius in pixels of the circle.
  iR | The red color value.
  iG | The green color value.
  iB | The blue color value.
  iA | The alpha value.
  idRes | a valid screen or image handle. By default it tries to use the default screen.

Returns
  true on success or false on failure.

## ◆ circleFilled() [1/2]

bool CRM64Pro::GFX::circleFilled | ( | float | fX,
|  | float | fY,
|  | float | fRad,
|  | Uint32 | iColor,
|  | Sint32 | idRes = 0 )

Draw a filled circle.

Parameters

  fX | X coordinate of the center of the circle.
  fY | Y coordinate of the center of the circle.
  fRad | Radius in pixels of the circle.
  iColor | The color value (0xRRGGBBAA).
  idRes | a valid screen or image handle. By default it tries to use the default screen.

Returns
  true on success or false on failure.

## ◆ circleFilled() [2/2]

bool CRM64Pro::GFX::circleFilled | ( | float | fX,
|  | float | fY,
|  | float | fRad,
|  | Uint8 | iR,
|  | Uint8 | iG,
|  | Uint8 | iB,
|  | Uint8 | iA,
|  | Sint32 | idRes = 0 )

Draw a filled circle.

Parameters

  fX | X coordinate of the center of the circle.
  fY | Y coordinate of the center of the circle.
  fRad | Radius in pixels of the circle.
  iR | The red color value.
  iG | The green color value.
  iB | The blue color value.
  iA | The alpha value.
  idRes | a valid screen or image handle. By default it tries to use the default screen.

Returns
  true on success or false on failure.

## ◆ ellipse() [1/2]

bool CRM64Pro::GFX::ellipse | ( | float | fX,
|  | float | fY,
|  | float | fRadX,
|  | float | fRadY,
|  | Uint32 | iColor,
|  | Sint32 | idRes = 0 )

Draw an outlined ellipse.

Parameters

  fX | X coordinate of the center of the ellipse.
  fY | Y coordinate of the center of the ellipse.
  fRadX | horizontal radius in pixels of the ellipse.
  fRadY | vertical radius in pixels of the ellipse.
  iColor | The color value (0xRRGGBBAA).
  idRes | a valid screen or image handle. By default it tries to use the default screen.

Returns
  true on success or false on failure.

## ◆ ellipse() [2/2]

bool CRM64Pro::GFX::ellipse | ( | float | fX,
|  | float | fY,
|  | float | fRadX,
|  | float | fRadY,
|  | Uint8 | iR,
|  | Uint8 | iG,
|  | Uint8 | iB,
|  | Uint8 | iA,
|  | Sint32 | idRes = 0 )

Draw an outlined ellipse.

Parameters

  fX | X coordinate of the center of the ellipse.
  fY | Y coordinate of the center of the ellipse.
  fRadX | horizontal radius in pixels of the ellipse.
  fRadY | vertical radius in pixels of the ellipse.
  iR | The red color value.
  iG | The green color value.
  iB | The blue color value.
  iA | The alpha value.
  idRes | a valid screen or image handle. By default it tries to use the default screen.

Returns
  true on success or false on failure.

## ◆ ellipseFilled() [1/2]

bool CRM64Pro::GFX::ellipseFilled | ( | float | fX,
|  | float | fY,
|  | float | fRadX,
|  | float | fRadY,
|  | Uint32 | iColor,
|  | Sint32 | idRes = 0 )

Draw a filled ellipse.

Parameters

  fX | X coordinate of the center of the ellipse.
  fY | Y coordinate of the center of the ellipse.
  fRadX | horizontal radius in pixels of the ellipse.
  fRadY | vertical radius in pixels of the ellipse.
  iColor | The color value (0xRRGGBBAA).
  idRes | a valid screen or image handle. By default it tries to use the default screen.

Returns
  true on success or false on failure.

## ◆ ellipseFilled() [2/2]

bool CRM64Pro::GFX::ellipseFilled | ( | float | fX,
|  | float | fY,
|  | float | fRadX,
|  | float | fRadY,
|  | Uint8 | iR,
|  | Uint8 | iG,
|  | Uint8 | iB,
|  | Uint8 | iA,
|  | Sint32 | idRes = 0 )

Draw a filled ellipse.

Parameters

  fX | X coordinate of the center of the ellipse.
  fY | Y coordinate of the center of the ellipse.
  fRadX | horizontal radius in pixels of the ellipse.
  fRadY | vertical radius in pixels of the ellipse.
  iR | The red color value.
  iG | The green color value.
  iB | The blue color value.
  iA | The alpha value.
  idRes | a valid screen or image handle. By default it tries to use the default screen.

Returns
  true on success or false on failure.

## ◆ polygon() [1/2]

bool CRM64Pro::GFX::polygon | ( | float * | fVX,
|  | float * | fVY,
|  | Sint32 | iNV,
|  | Uint32 | iColor,
|  | Sint32 | idRes = 0 )

Draw an outlined polygon.

Parameters

  fVX | Vertex array containing X coordinates of the points of the polygon.
  fVY | Vertex array containing Y coordinates of the points of the polygon.
  iNV | Number of points in the vertex array. From a minimum number of 3 up to 32.
  iColor | The color value (0xRRGGBBAA).
  idRes | a valid screen or image handle. By default it tries to use the default screen.

Returns
  true on success or false on failure.

## ◆ polygon() [2/2]

bool CRM64Pro::GFX::polygon | ( | float * | fVX,
|  | float * | fVY,
|  | Sint32 | iNV,
|  | Uint8 | iR,
|  | Uint8 | iG,
|  | Uint8 | iB,
|  | Uint8 | iA,
|  | Sint32 | idRes = 0 )

Draw an outlined polygon.

Parameters

  fVX | Vertex array containing X coordinates of the points of the polygon.
  fVY | Vertex array containing Y coordinates of the points of the polygon.
  iNV | Number of points in the vertex array. From a minimum number of 3 up to 31.
  iR | The red color value.
  iG | The green color value.
  iB | The blue color value.
  iA | The alpha value.
  idRes | a valid screen or image handle. By default it tries to use the default screen.

Returns
  true on success or false on failure.

## ◆ polygonFilled() [1/2]

bool CRM64Pro::GFX::polygonFilled | ( | float * | fVX,
|  | float * | fVY,
|  | Sint32 | iNV,
|  | Uint32 | iColor,
|  | Sint32 | idRes = 0 )

Draw a filled polygon.

Parameters

  fVX | Vertex array containing X coordinates of the points of the polygon.
  fVY | Vertex array containing Y coordinates of the points of the polygon.
  iNV | Number of points in the vertex array. From a minimum number of 3 up to 32.
  iColor | The color value (0xRRGGBBAA).
  idRes | a valid screen or image handle. By default it tries to use the default screen.

Returns
  true on success or false on failure.

## ◆ polygonFilled() [2/2]

bool CRM64Pro::GFX::polygonFilled | ( | float * | fVX,
|  | float * | fVY,
|  | Sint32 | iNV,
|  | Uint8 | iR,
|  | Uint8 | iG,
|  | Uint8 | iB,
|  | Uint8 | iA,
|  | Sint32 | idRes = 0 )

Draw a filled polygon.

Parameters

  fVX | Vertex array containing X coordinates of the points of the polygon.
  fVY | Vertex array containing Y coordinates of the points of the polygon.
  iNV | Number of points in the vertex array. From a minimum number of 3 up to 32.
  iR | The red color value.
  iG | The green color value.
  iB | The blue color value.
  iA | The alpha value.
  idRes | a valid screen or image handle. By default it tries to use the default screen.

Returns
  true on success or false on failure.

## ◆ RGBtoHSV()

bool CRM64Pro::GFX::RGBtoHSV | ( | Uint8 | iR,
|  | Uint8 | iG,
|  | Uint8 | iB,
|  | float * | fH,
|  | float * | fS,
|  | float * | fV )

Color conversion from RGB to HSV.

Parameters

  iR | Red component.
  iG | Green component.
  iB | Blue component.
  fH | pointer to Hue component.
  fS | pointer to Saturation component.
  fV | pointer to Value component.

Returns
  true on success or false on failure.

## ◆ HSVtoRGB()

bool CRM64Pro::GFX::HSVtoRGB | ( | float | fH,
|  | float | fS,
|  | float | fV,
|  | Uint8 * | iR,
|  | Uint8 * | iG,
|  | Uint8 * | iB )

Color conversion from HSV to RGB.

Parameters

  fH | Hue component.
  fS | Saturation component.
  fV | Value component.
  iR | pointer to Red component.
  iG | pointer to Green component.
  iB | pointer to Blue component.

Returns
  true on success or false on failure.

## ◆ RGBtoYUV()

bool CRM64Pro::GFX::RGBtoYUV | ( | Uint8 | iR,
|  | Uint8 | iG,
|  | Uint8 | iB,
|  | Uint8 * | iY,
|  | Uint8 * | iU,
|  | Uint8 * | iV )

Color conversion from RGB to YUV.

Parameters

  iR | Red component.
  iG | Green component.
  iB | Blue component.
  iY | pointer to luma component.
  iU | pointer to chrominance U component.
  iV | pointer to chrominance V component.

Returns
  true on success or false on failure.

## ◆ YUVtoRGB()

bool CRM64Pro::GFX::YUVtoRGB | ( | Uint8 | iY,
|  | Uint8 | iU,
|  | Uint8 | iV,
|  | Uint8 * | iR,
|  | Uint8 * | iG,
|  | Uint8 * | iB )

Color conversion from YUV to RGB.

Parameters

  iY | luma component.
  iU | chrominance U component.
  iV | chrominance V component.
  iR | pointer to Red component.
  iG | pointer to Green component.
  iB | pointer to Blue component.

Returns
  true on success or false on failure.

## ◆ RGBtoCMYK()

bool CRM64Pro::GFX::RGBtoCMYK | ( | Uint8 | iR,
|  | Uint8 | iG,
|  | Uint8 | iB,
|  | Uint8 * | iC,
|  | Uint8 * | iM,
|  | Uint8 * | iY,
|  | Uint8 * | iK )

Color conversion from RGB to CMYK.

Parameters

  iR | Red component.
  iG | Green component.
  iB | Blue component.
  iC | pointer to cyan component.
  iM | pointer to magenta component.
  iY | pointer to yellow component.
  iK | pointer to key(black) component.

Returns
  true on success or false on failure.

## ◆ CMYKtoRGB()

bool CRM64Pro::GFX::CMYKtoRGB | ( | Uint8 | iC,
|  | Uint8 | iM,
|  | Uint8 | iY,
|  | Uint8 | iK,
|  | Uint8 * | iR,
|  | Uint8 * | iG,
|  | Uint8 * | iB )

Color conversion from CMYK to RGB.

Parameters

  iC | cyan component.
  iM | magenta component.
  iY | yellow component.
  iK | key(black) component.
  iR | pointer to Red component.
  iG | pointer to Green component.
  iB | pointer to Blue component.

Returns
  true on success or false on failure.

## ◆ RGBtoYCC()

bool CRM64Pro::GFX::RGBtoYCC | ( | Uint8 | iR,
|  | Uint8 | iG,
|  | Uint8 | iB,
|  | Uint8 * | iY,
|  | Uint8 * | Cb,
|  | Uint8 * | Cr )

Color conversion from RGB to YCC.

Parameters

  iR | Red component.
  iG | Green component.
  iB | Blue component.
  iY | pointer to luma component.
  Cb | pointer to chrominance blue component.
  Cr | pointer to chrominance red component.

Returns
  true on success or false on failure.

## ◆ YCCtoRGB()

bool CRM64Pro::GFX::YCCtoRGB | ( | Uint8 | iY,
|  | Uint8 | Cb,
|  | Uint8 | Cr,
|  | Uint8 * | iR,
|  | Uint8 * | iG,
|  | Uint8 * | iB )

Color conversion from YCC to RGB.

Parameters

  iY | luma component.
  Cb | chrominance blue component.
  Cr | chrominance red component.
  iR | pointer to Red component.
  iG | pointer to Green component.
  iB | pointer to Blue component.

Returns
  true on success or false on failure.