1.1.0
Classes | Functions
C++

All C++ classes and functions. More...

Classes

struct  fc::color
 A wrapper class for fc_color. More...
 
struct  fc::font_size
 A wrapper class for fc_font_size. More...
 
class  fc::font
 A wrapper class for fc_font. More...
 

Functions

color fc::rgba (uint32_t c)
 Constructs a fc::color instance from an integer with red, green, blue and alpha components. More...
 
color fc::rgba (uint8_t r, uint8_t g, uint8_t b, uint8_t a)
 Constructs a fc::color instance from red, green, blue and alpha values. More...
 
color fc::rgb (uint8_t r, uint8_t g, uint8_t b)
 Constructs a fc::color instance from red, green and blue values, alpha will be set to 255 (opaque) More...
 
color fc::rgb (uint32_t c)
 Constructs a fc::color instance from an integer with red, green and blue components, alpha will be set to 255 (opaque) More...
 
font_size fc::px (float v)
 Constructs a fc::font_size instance in pixels with specified value. More...
 
font_size fc::pt (float v)
 Constructs a fc::font_size instance in points with specified value. More...
 
font fc::from (uint8_t const *font_data, fc::font_size const &font_size, fc::color const &font_color)
 A helper method to ease font cooking via method chaining. More...
 

Detailed Description

All C++ classes and functions.

Function Documentation

◆ rgba() [1/2]

color fc::rgba ( uint32_t  c)
inline

Constructs a fc::color instance from an integer with red, green, blue and alpha components.

Parameters
cAn integer in the form 0xRRGGBBAA
Returns
A fc::color instance
See also
fc_0xrgba

◆ rgba() [2/2]

color fc::rgba ( uint8_t  r,
uint8_t  g,
uint8_t  b,
uint8_t  a 
)
inline

Constructs a fc::color instance from red, green, blue and alpha values.

Parameters
rThe red component
gThe green component
bThe blue component
aThe alpha component
Returns
A fc::color instance
See also
fc_rgba

◆ rgb() [1/2]

color fc::rgb ( uint8_t  r,
uint8_t  g,
uint8_t  b 
)
inline

Constructs a fc::color instance from red, green and blue values, alpha will be set to 255 (opaque)

Parameters
rThe red component
gThe green component
bThe blue component
Returns
A fc::color instance
See also
fc_rgb

◆ rgb() [2/2]

color fc::rgb ( uint32_t  c)
inline

Constructs a fc::color instance from an integer with red, green and blue components, alpha will be set to 255 (opaque)

Parameters
cAn integer in the form 0x__RRGGBB (leftmost byte is ignored)
Returns
A fc::color instance
See also
fc_0xrgb

◆ px()

font_size fc::px ( float  v)
inline

Constructs a fc::font_size instance in pixels with specified value.

Parameters
vThe value size, in pixels, for this font
Returns
A fc::font_size instance
See also
fc_px

◆ pt()

font_size fc::pt ( float  v)
inline

Constructs a fc::font_size instance in points with specified value.

Parameters
vThe value size, in points, for this font
Returns
A fc::font_size instance
See also
fc_pt

◆ from()

font fc::from ( uint8_t const *  font_data,
fc::font_size const &  font_size,
fc::color const &  font_color 
)

A helper method to ease font cooking via method chaining.

Example

auto font = fc::from(fdata, fc::px(12), fc::rgb(255, 0, 0))
.add(fc_unicode_block_basic_latin)
.add(fc_unicode_block_latin_1_supplement)
.cook()
Parameters
font_dataThe font data to pass to fc::font constructor
font_sizeThe font size to pass to fc::font constructor
font_colorThe font color to pass to fc::font constructor
Returns
A fc::font instance
See also
fc::font::font
fc_construct
Examples
main.cpp.
fc::rgb
color rgb(uint8_t r, uint8_t g, uint8_t b)
Constructs a fc::color instance from red, green and blue values, alpha will be set to 255 (opaque)
Definition: color.hpp:135
fc::px
font_size px(float v)
Constructs a fc::font_size instance in pixels with specified value.
Definition: font-size.hpp:59
fc::font::cook
font & cook() &
Cooks all the added unicode ranges into a pixmap and clipping information.
Definition: font.hpp:142
fc::from
font from(uint8_t const *font_data, fc::font_size const &font_size, fc::color const &font_color)
A helper method to ease font cooking via method chaining.
Definition: font.hpp:238
fc::font::add
font & add(fc_unicode_block const &block) &
Adds a new unicode block to be cooked.
Definition: font.hpp:85