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).

fn char_offset_for_pixel<TStr: ToStringVar + ToVar>(&self, text: &TStr, rtl: bool, override_direction: bool, position: i32) -> Option<u32>

fn pixel_offset_for_character<TStr: ToStringVar + ToVar>(&self, text: &TStr, rtl: bool, override_direction: bool, char_offset: u32) -> Option<i32>

Trait Implementations

impl Send for Font

impl Resource for Font

fn unwrap(&self) -> PP_Resource

fn type_of(&self) -> ResourceType

impl ToOption<PP_Resource> for Font

fn to_option(from: &PP_Resource) -> Option<Font>

impl Clone for Font

fn clone(&self) -> Font

fn clone_from(&mut self, source: &Self)

impl Drop for Font

fn drop(&mut self)

Derived Implementations

impl Show for Font

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl PartialEq for Font

fn eq(&self, __arg_0: &Font) -> bool

fn ne(&self, __arg_0: &Font) -> bool

impl Eq for Font

fn assert_receiver_is_total_eq(&self)

impl<__S: Writer + Hasher> Hash<__S> for Font

fn hash(&self, __arg_0: &mut __S)