Inherits Cairo::ScaledFont.
Public Member Functions | |
void | select_font (HDC hdc) |
Selects the font into the given device context and changes the map mode and world transformation of the device context to match that of the font. | |
void | done_font () |
Releases any resources allocated by select_font(). | |
double | get_metrics_factor () const |
Gets a scale factor between logical coordinates in the coordinate space used by select_font() (that is, the coordinate system used by the Windows functions to return metrics) and font space coordinates. | |
void | get_logical_to_device (Matrix& logical_to_device) const |
Gets the transformation mapping the logical space used by this scaled font to device space. | |
void | get_device_to_logical (Matrix& device_to_logical) const |
Gets the transformation mapping device space to the logical space used by this scaled font. | |
Static Public Member Functions | |
static RefPtr< Win32ScaledFont > | create (const RefPtr< Win32FontFace >& font_face, const Matrix& font_matrix, const Matrix& ctm, const FontOptions& options=FontOptions()) |
Creates a scaled font for the given Win32FontFace. | |
Protected Member Functions | |
Win32ScaledFont (const RefPtr< Win32FontFace >& font_face, const Matrix& font_matrix, const Matrix& ctm, const FontOptions& options=FontOptions()) |
Cairo::Win32ScaledFont::Win32ScaledFont | ( | const RefPtr< Win32FontFace >& | font_face, | |
const Matrix& | font_matrix, | |||
const Matrix& | ctm, | |||
const FontOptions& | options = FontOptions() | |||
) | [protected] |
static RefPtr<Win32ScaledFont> Cairo::Win32ScaledFont::create | ( | const RefPtr< Win32FontFace >& | font_face, | |
const Matrix& | font_matrix, | |||
const Matrix& | ctm, | |||
const FontOptions& | options = FontOptions() | |||
) | [static] |
void Cairo::Win32ScaledFont::done_font | ( | ) |
void Cairo::Win32ScaledFont::get_device_to_logical | ( | Matrix& | device_to_logical | ) | const |
Gets the transformation mapping device space to the logical space used by this scaled font.
device_to_logical | matrix to return |
void Cairo::Win32ScaledFont::get_logical_to_device | ( | Matrix& | logical_to_device | ) | const |
Gets the transformation mapping the logical space used by this scaled font to device space.
logical_to_device | matrix to return |
double Cairo::Win32ScaledFont::get_metrics_factor | ( | ) | const |
Gets a scale factor between logical coordinates in the coordinate space used by select_font() (that is, the coordinate system used by the Windows functions to return metrics) and font space coordinates.
void Cairo::Win32ScaledFont::select_font | ( | HDC | hdc | ) |
Selects the font into the given device context and changes the map mode and world transformation of the device context to match that of the font.
This function is intended for use when using layout APIs such as Uniscribe to do text layout with the cairo font. After finishing using the device context, you must call done_font() to release any resources allocated by this function.
See get_metrics_factor() for converting logical coordinates from the device context to font space.
Normally, calls to SaveDC() and RestoreDC() would be made around the use of this function to preserve the original graphics state.
scaled_font | A cairo_scaled_font_t from the Win32 font backend. Such an object can be created with Win32FontFace::create_for_logfontw(). | |
hdc | a device context |