[][src]Struct direct2d::device_context::DeviceContext

#[repr(C)]
pub struct DeviceContext { /* fields omitted */ }

Methods

impl DeviceContext[src]

pub fn create(device: &Device) -> D2DResult<DeviceContext>[src]

pub fn set_target(&mut self, target: &Image)[src]

Methods from Deref<Target = RenderTarget>

pub fn size(&self) -> Sizef[src]

pub fn pixel_size(&self) -> Sizeu[src]

pub fn begin_draw(&mut self)[src]

pub fn end_draw(&mut self) -> Result<(), (Error, Option<RenderTag>)>[src]

pub fn set_tag(&mut self, tag: Option<RenderTag>)[src]

pub fn get_tag(&self) -> Option<RenderTag>[src]

pub fn flush(&mut self) -> Result<(), (Error, Option<RenderTag>)>[src]

pub fn clear(&mut self, color: impl Into<Color>)[src]

pub fn draw_line(
    &mut self,
    p0: impl Into<Point2f>,
    p1: impl Into<Point2f>,
    brush: &Brush,
    stroke_width: f32,
    stroke_style: Option<&StrokeStyle>
)
[src]

pub fn draw_rectangle(
    &mut self,
    rect: impl Into<Rectf>,
    brush: &Brush,
    stroke_width: f32,
    stroke_style: Option<&StrokeStyle>
)
[src]

pub fn fill_rectangle(&mut self, rect: impl Into<Rectf>, brush: &Brush)[src]

pub fn draw_rounded_rectangle(
    &mut self,
    rect: impl Into<RoundedRect>,
    brush: &Brush,
    stroke_width: f32,
    stroke_style: Option<&StrokeStyle>
)
[src]

pub fn fill_rounded_rectangle(
    &mut self,
    rect: impl Into<RoundedRect>,
    brush: &Brush
)
[src]

pub fn draw_ellipse(
    &mut self,
    ellipse: impl Into<Ellipse>,
    brush: &Brush,
    stroke_width: f32,
    stroke_style: Option<&StrokeStyle>
)
[src]

pub fn fill_ellipse(&mut self, ellipse: impl Into<Ellipse>, brush: &Brush)[src]

pub fn draw_geometry(
    &mut self,
    geometry: &Geometry,
    brush: &Brush,
    stroke_width: f32,
    stroke_style: Option<&StrokeStyle>
)
[src]

pub fn fill_geometry(&mut self, geometry: &Geometry, brush: &Brush)[src]

pub fn fill_geometry_with_opacity(
    &mut self,
    geometry: &Geometry,
    brush: &Brush,
    opacity_brush: &Brush
)
[src]

pub fn draw_bitmap(
    &mut self,
    bitmap: &Bitmap,
    dest_rect: impl Into<Rectf>,
    opacity: f32,
    interpolation: BitmapInterpolationMode,
    src_rect: impl Into<Rectf>
)
[src]

pub fn draw_text(
    &mut self,
    text: &str,
    format: &TextFormat,
    layout_rect: impl Into<Rectf>,
    foreground_brush: &Brush,
    options: DrawTextOptions
)
[src]

pub fn draw_text_layout(
    &mut self,
    origin: impl Into<Point2f>,
    layout: &TextLayout,
    brush: &Brush,
    options: DrawTextOptions
)
[src]

pub fn set_transform(&mut self, transform: &Matrix3x2f)[src]

pub fn transform(&self) -> Matrix3x2f[src]

pub fn set_antialias_mode(&mut self, mode: AntialiasMode)[src]

pub fn antialias_mode(&mut self) -> UncheckedEnum<AntialiasMode>[src]

pub fn set_dpi(&mut self, dpi_x: f32, dpi_y: f32)[src]

pub fn dpi(&self) -> (f32, f32)[src]

pub fn push_layer<'a, 'b>(
    &'a mut self,
    layer: &'b Layer
) -> LayerBuilder<'a, 'b> where
    Self: Sized + 'a, 
[src]

pub fn pop_layer(&mut self)[src]

pub fn push_axis_aligned_clip(
    &mut self,
    clip: impl Into<Rectf>,
    aa: AntialiasMode
)
[src]

pub fn pop_axis_aligned_clip(&mut self)[src]

Trait Implementations

impl RenderTargetType for DeviceContext[src]

fn try_cast<R: RenderTargetType>(self) -> Option<R> where
    Self: Sized
[src]

Try to cast this factory to a different factory type

fn try_with_cast<R: RenderTargetType, V>(
    &self,
    f: impl FnOnce(&R) -> V
) -> Option<V>
[src]

Try to temporarily upcast this type to perform an operation

impl Sync for DeviceContext[src]

impl Send for DeviceContext[src]

impl DerefMut for DeviceContext[src]

impl Deref for DeviceContext[src]

type Target = RenderTarget

The resulting type after dereferencing.

impl Debug for DeviceContext[src]

impl ComWrapper for DeviceContext[src]

type Interface = ID2D1DeviceContext

The raw interface type from winapi

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> FontKey for T where
    T: Send + Sync + 'static + ?Sized
[src]