Struct ppapi::font::FontExperimental
[-]
[+]
[src]
pub struct Font(_);
Methods
impl Font
fn new(res: PP_Resource) -> Font
fn new_bumped(res: PP_Resource) -> Font
impl Font
fn describe(&self) -> Option<(Description, Metrics)>
fn measure_text<T: ToStringVar + ToVar>(&self, text: &T, rtl: bool, override_direction: bool) -> Option<i32>
fn draw_text<TStr: ToStringVar + ToVar>(&self, image: &ImageData, text: &TStr, rtl: bool, override_direction: bool, pos: Point, color: u32, clip: Option<Rect>, image_data_is_opaque: bool) -> Code
! * Draws the text to the image buffer. * * The given point represents the baseline of the left edge of the font, * regardless of whether it is left-to-right or right-to-left (in the case of * RTL text, this will actually represent the logical end of the text). * * The clip is optional and may be NULL. In this case, the text will be * clipped to the image. * * The image_data_is_opaque flag indicates whether subpixel antialiasing can * be performed, if it is supported. When the image below the text is * opaque, subpixel antialiasing is supported and you should set this to * PP_TRUE to pick up the user's default preferences. If your plugin is * partially transparent, then subpixel antialiasing is not possible and * grayscale antialiasing will be used instead (assuming the user has * antialiasing enabled at all).