Trait winsafe::prelude::gdi_Hfont

source ·
pub trait gdi_Hfont: Handle {
    // Provided methods
    fn CreateFont(
        sz: SIZE,
        escapement: i32,
        orientation: i32,
        weight: FW,
        italic: bool,
        underline: bool,
        strike_out: bool,
        char_set: CHARSET,
        out_precision: OUT_PRECIS,
        clip_precision: CLIP,
        quality: QUALITY,
        pitch_and_family: PITCH,
        face_name: &str
    ) -> SysResult<DeleteObjectGuard<HFONT>> { ... }
    fn CreateFontIndirect(lf: &LOGFONT) -> SysResult<DeleteObjectGuard<HFONT>> { ... }
    fn GetObject(&self, lf: &mut LOGFONT) -> SysResult<()> { ... }
    fn GetStockObject(sf: STOCK_FONT) -> SysResult<HFONT> { ... }
}
Available on crate features kernel and gdi only.
Expand description

This trait is enabled with the gdi feature, and provides methods for HFONT.

Prefer importing this trait through the prelude:

use winsafe::prelude::*;

Provided Methods§

source

fn CreateFont( sz: SIZE, escapement: i32, orientation: i32, weight: FW, italic: bool, underline: bool, strike_out: bool, char_set: CHARSET, out_precision: OUT_PRECIS, clip_precision: CLIP, quality: QUALITY, pitch_and_family: PITCH, face_name: &str ) -> SysResult<DeleteObjectGuard<HFONT>>

CreateFont function.

source

fn CreateFontIndirect(lf: &LOGFONT) -> SysResult<DeleteObjectGuard<HFONT>>

source

fn GetObject(&self, lf: &mut LOGFONT) -> SysResult<()>

GetObject function.

§Examples
use winsafe::{self as w, prelude::*};

let hfont: w::HFONT; // initialized somewhere

let mut log_font = w::LOGFONT::default();
hfont.GetObject(&mut log_font)?;
source

fn GetStockObject(sf: STOCK_FONT) -> SysResult<HFONT>

GetStockObject function.

Object Safety§

This trait is not object safe.

Implementors§