XS Framework
A 3DS homebrew development framework.
 
Loading...
Searching...
No Matches
xs::graphics Namespace Reference

Namespaces

namespace  screen
 

Functions

void DrawSolidRect (float x, float y, float width, float height, float depth, u32 color)
 Draw a solid rectangle.
 
void DrawSolidLine (float x1, float y1, float x2, float y2, float thickness, float depth, u32 color)
 Draw a Line.
 
u32 color (const std::string &hexStr, int alpha=255)
 Convert a hex color string to a u32 color value.
 

Variables

const u32 clrWhite
 Common color constants (RGBA packed into u32 using C2D_Color32).
 
const u32 clrBlack
 
const u32 clrRed
 
const u32 clrGreen
 
const u32 clrBlue
 
const u32 clrYellow
 
const u32 clrCyan
 
const u32 clrMagenta
 
const u32 clrClear
 

Function Documentation

◆ color()

u32 xs::graphics::color ( const std::string & hexStr,
int alpha = 255 )

Convert a hex color string to a u32 color value.

Parameters
hexStrThe hex color string (e.g., "#RRGGBB" or "RRGGBB").
alphaValue from 0-255 (Transparency)
Returns
u32 (or C2D_Color32)
Here is the caller graph for this function:

◆ DrawSolidLine()

void xs::graphics::DrawSolidLine ( float x1,
float y1,
float x2,
float y2,
float thickness,
float depth,
u32 color )

Draw a Line.

Parameters
x1X coordinate of the start point of the line
y1Y coordinate of the start point of the line
x2X coordinate of the end point of the line
y2Y coordinate of the end point of the line
thicknessThickness of the line
depthZ coordinate of the line 0.0f - 1.0f
colorcolor() format
Here is the call graph for this function:

◆ DrawSolidRect()

void xs::graphics::DrawSolidRect ( float x,
float y,
float width,
float height,
float depth,
u32 color )

Draw a solid rectangle.

Parameters
xX coordinate of the top-left vertex of the rectangle
yY coordinate of the top-left vertex of the rectangle
depthZ coordinate of the rectangle
widthWidth of the rectangle
heightHeight of the rectangle
colorcolor() format
Here is the call graph for this function:

Variable Documentation

◆ clrBlack

const u32 xs::graphics::clrBlack
extern

◆ clrBlue

const u32 xs::graphics::clrBlue
extern

◆ clrClear

const u32 xs::graphics::clrClear
extern

◆ clrCyan

const u32 xs::graphics::clrCyan
extern

◆ clrGreen

const u32 xs::graphics::clrGreen
extern

◆ clrMagenta

const u32 xs::graphics::clrMagenta
extern

◆ clrRed

const u32 xs::graphics::clrRed
extern

◆ clrWhite

const u32 xs::graphics::clrWhite
extern

Common color constants (RGBA packed into u32 using C2D_Color32).

◆ clrYellow

const u32 xs::graphics::clrYellow
extern