[][src]Trait dxplr::d2d1::IRenderTarget

pub trait IRenderTarget: IResource {
    fn begin_draw(&self);
fn clear(&self, color: impl Into<ColorF>);
unsafe fn create_bitmap(
        &self,
        size: impl Into<SizeU>,
        src_data: Option<&[u8]>,
        pitch: u32,
        props: &BitmapProperties
    ) -> Result<Bitmap, HResult>;
fn create_bitmap_brush(
        &self,
        bitmap: &impl IBitmap,
        props: Option<&BitmapBrushProperties>,
        brush_props: Option<&BrushProperties>
    ) -> Result<BitmapBrush, HResult>;
fn create_compatible_render_target(
        &self,
        size: Option<SizeF>,
        pixel_size: Option<SizeU>,
        format: Option<&PixelFormat>,
        options: CompatibleRenderTargetOptions
    ) -> Result<BitmapRenderTarget, HResult>;
fn create_gradient_stop_collection(
        &self,
        stops: &[GradientStop],
        gamma: Gamma,
        mode: ExtendMode
    ) -> Result<GradientStopCollection, HResult>;
fn create_layer(&self, size: Option<SizeF>) -> Result<Layer, HResult>;
fn create_linear_gradient_brush(
        &self,
        props: &LinearGradientBrushProperties,
        brush_props: Option<&BrushProperties>,
        gradient: &impl IGradientStopCollection
    ) -> Result<LinearGradientBrush, HResult>;
fn create_mesh(&self) -> Result<Mesh, HResult>;
fn create_radial_gradient_brush(
        &self,
        props: &RadialGradientBrushProperties,
        brush_props: Option<&BrushProperties>,
        gradient: &impl IGradientStopCollection
    ) -> Result<RadialGradientBrush, HResult>;
fn create_solid_color_brush(
        &self,
        color: impl Into<ColorF>,
        brush_props: Option<&BrushProperties>
    ) -> Result<SolidColorBrush, HResult>;
fn draw_bitmap(
        &self,
        bitmap: &impl IBitmap,
        dest_rect: Option<&RectF>,
        opacity: Option<f32>,
        interpolation: Option<BitmapInterpolationMode>,
        src_rect: Option<&RectF>
    );
fn draw_ellipse(
        &self,
        ellipse: &Ellipse,
        brush: &impl IBrush,
        width: Option<f32>,
        stroke_style: Option<&StrokeStyle>
    );
fn draw_geometry(
        &self,
        geometry: &impl IGeometry,
        brush: &impl IBrush,
        width: Option<f32>,
        stroke_style: Option<&StrokeStyle>
    );
fn draw_glyph_run(
        &self,
        baseline_origin: impl Into<Point2F>,
        glyph_run: &GlyphRun,
        brush: &impl IBrush,
        mode: MeasuringMode
    );
fn draw_line(
        &self,
        point0: impl Into<Point2F>,
        point1: impl Into<Point2F>,
        brush: &impl IBrush,
        width: Option<f32>,
        stroke_style: Option<&StrokeStyle>
    );
fn draw_rectangle(
        &self,
        rect: impl Into<RectF>,
        brush: &impl IBrush,
        width: Option<f32>,
        stroke_style: Option<&StrokeStyle>
    );
fn draw_rounded_rectangle(
        &self,
        round: &RoundedRect,
        brush: &impl IBrush,
        width: Option<f32>,
        stroke_style: Option<&StrokeStyle>
    );
fn draw_text(
        &self,
        string: impl AsRef<str>,
        format: &impl ITextFormat,
        rect: impl Into<RectF>,
        fill_brush: &impl IBrush,
        options: Option<DrawTextOptions>,
        measure_mode: Option<MeasuringMode>
    );
fn draw_text_layout(
        &self,
        origin: impl Into<Point2F>,
        layout: &impl ITextLayout,
        fill_brush: &impl IBrush,
        options: Option<DrawTextOptions>
    );
fn end_draw(&self) -> Result<(), HResultWithTags>;
fn fill_ellipse(&self, ellipse: &Ellipse, brush: &impl IBrush);
fn fill_geometry(
        &self,
        geometry: &impl IGeometry,
        brush: &impl IBrush,
        opacity: Option<&Brush>
    );
fn fill_mesh(&self, mesh: &impl IMesh, brush: &impl IBrush);
fn fill_opacity_mask(
        &self,
        mask: &impl IBitmap,
        brush: &impl IBrush,
        content: OpacityMaskContent,
        dest_rect: Option<&RectF>,
        src_rect: Option<&RectF>
    );
fn fill_rectangle(&self, rect: impl Into<RectF>, brush: &impl IBrush);
fn fill_rounded_rectangle(&self, rounded: &RoundedRect, brush: &impl IBrush);
fn flush(&self) -> Result<(), HResultWithTags>;
fn get_antialias_mode(&self) -> AntialiasMode;
fn get_dpi(&self) -> Vector2F;
fn get_maximum_bitmap_size(&self) -> u32;
fn get_pixel_format(&self) -> PixelFormat;
fn get_pixel_size(&self) -> SizeU;
fn get_size(&self) -> SizeF;
fn get_tags(&self) -> (Tag, Tag);
fn get_text_antialias_mode(&self) -> TextAntialiasMode;
fn get_text_rendering(&self) -> Option<RenderingParams>;
fn get_transform(&self) -> Matrix3x2F;
fn is_supported(&self, props: &RenderTargetProperties) -> bool;
fn pop_axis_aligned_clip(&self);
fn pop_layer(&self);
fn push_axis_aligned_clip(
        &self,
        rect: impl Into<RectF>,
        mode: AntialiasMode
    );
fn push_layer(&self, params: &LayerParameters, layer: Option<&Layer>);
fn restore_drawing_state(&self, block: &impl IDrawingStateBlock);
fn save_drawing_state(&self, block: &impl IDrawingStateBlock);
fn set_antialias_mode(&self, mode: AntialiasMode);
fn set_dpi(&self, x: f32, y: f32);
fn set_tags(&self, tag1: Tag, tag2: Tag);
fn set_text_antialias_mode(&self, mode: TextAntialiasMode);
fn set_text_rendering_params(&self, params: Option<&RenderingParams>);
fn set_transform(&self, m: &Matrix3x2F); }

Required methods

fn begin_draw(&self)

fn clear(&self, color: impl Into<ColorF>)

unsafe fn create_bitmap(
    &self,
    size: impl Into<SizeU>,
    src_data: Option<&[u8]>,
    pitch: u32,
    props: &BitmapProperties
) -> Result<Bitmap, HResult>

fn create_bitmap_brush(
    &self,
    bitmap: &impl IBitmap,
    props: Option<&BitmapBrushProperties>,
    brush_props: Option<&BrushProperties>
) -> Result<BitmapBrush, HResult>

fn create_compatible_render_target(
    &self,
    size: Option<SizeF>,
    pixel_size: Option<SizeU>,
    format: Option<&PixelFormat>,
    options: CompatibleRenderTargetOptions
) -> Result<BitmapRenderTarget, HResult>

fn create_gradient_stop_collection(
    &self,
    stops: &[GradientStop],
    gamma: Gamma,
    mode: ExtendMode
) -> Result<GradientStopCollection, HResult>

fn create_layer(&self, size: Option<SizeF>) -> Result<Layer, HResult>

fn create_linear_gradient_brush(
    &self,
    props: &LinearGradientBrushProperties,
    brush_props: Option<&BrushProperties>,
    gradient: &impl IGradientStopCollection
) -> Result<LinearGradientBrush, HResult>

fn create_mesh(&self) -> Result<Mesh, HResult>

fn create_radial_gradient_brush(
    &self,
    props: &RadialGradientBrushProperties,
    brush_props: Option<&BrushProperties>,
    gradient: &impl IGradientStopCollection
) -> Result<RadialGradientBrush, HResult>

fn create_solid_color_brush(
    &self,
    color: impl Into<ColorF>,
    brush_props: Option<&BrushProperties>
) -> Result<SolidColorBrush, HResult>

fn draw_bitmap(
    &self,
    bitmap: &impl IBitmap,
    dest_rect: Option<&RectF>,
    opacity: Option<f32>,
    interpolation: Option<BitmapInterpolationMode>,
    src_rect: Option<&RectF>
)

fn draw_ellipse(
    &self,
    ellipse: &Ellipse,
    brush: &impl IBrush,
    width: Option<f32>,
    stroke_style: Option<&StrokeStyle>
)

fn draw_geometry(
    &self,
    geometry: &impl IGeometry,
    brush: &impl IBrush,
    width: Option<f32>,
    stroke_style: Option<&StrokeStyle>
)

fn draw_glyph_run(
    &self,
    baseline_origin: impl Into<Point2F>,
    glyph_run: &GlyphRun,
    brush: &impl IBrush,
    mode: MeasuringMode
)

fn draw_line(
    &self,
    point0: impl Into<Point2F>,
    point1: impl Into<Point2F>,
    brush: &impl IBrush,
    width: Option<f32>,
    stroke_style: Option<&StrokeStyle>
)

fn draw_rectangle(
    &self,
    rect: impl Into<RectF>,
    brush: &impl IBrush,
    width: Option<f32>,
    stroke_style: Option<&StrokeStyle>
)

fn draw_rounded_rectangle(
    &self,
    round: &RoundedRect,
    brush: &impl IBrush,
    width: Option<f32>,
    stroke_style: Option<&StrokeStyle>
)

fn draw_text(
    &self,
    string: impl AsRef<str>,
    format: &impl ITextFormat,
    rect: impl Into<RectF>,
    fill_brush: &impl IBrush,
    options: Option<DrawTextOptions>,
    measure_mode: Option<MeasuringMode>
)

fn draw_text_layout(
    &self,
    origin: impl Into<Point2F>,
    layout: &impl ITextLayout,
    fill_brush: &impl IBrush,
    options: Option<DrawTextOptions>
)

fn end_draw(&self) -> Result<(), HResultWithTags>

fn fill_ellipse(&self, ellipse: &Ellipse, brush: &impl IBrush)

fn fill_geometry(
    &self,
    geometry: &impl IGeometry,
    brush: &impl IBrush,
    opacity: Option<&Brush>
)

fn fill_mesh(&self, mesh: &impl IMesh, brush: &impl IBrush)

fn fill_opacity_mask(
    &self,
    mask: &impl IBitmap,
    brush: &impl IBrush,
    content: OpacityMaskContent,
    dest_rect: Option<&RectF>,
    src_rect: Option<&RectF>
)

fn fill_rectangle(&self, rect: impl Into<RectF>, brush: &impl IBrush)

fn fill_rounded_rectangle(&self, rounded: &RoundedRect, brush: &impl IBrush)

fn flush(&self) -> Result<(), HResultWithTags>

fn get_antialias_mode(&self) -> AntialiasMode

fn get_dpi(&self) -> Vector2F

fn get_maximum_bitmap_size(&self) -> u32

fn get_pixel_format(&self) -> PixelFormat

fn get_pixel_size(&self) -> SizeU

fn get_size(&self) -> SizeF

fn get_tags(&self) -> (Tag, Tag)

fn get_text_antialias_mode(&self) -> TextAntialiasMode

fn get_text_rendering(&self) -> Option<RenderingParams>

fn get_transform(&self) -> Matrix3x2F

fn is_supported(&self, props: &RenderTargetProperties) -> bool

fn pop_axis_aligned_clip(&self)

fn pop_layer(&self)

fn push_axis_aligned_clip(&self, rect: impl Into<RectF>, mode: AntialiasMode)

fn push_layer(&self, params: &LayerParameters, layer: Option<&Layer>)

fn restore_drawing_state(&self, block: &impl IDrawingStateBlock)

fn save_drawing_state(&self, block: &impl IDrawingStateBlock)

fn set_antialias_mode(&self, mode: AntialiasMode)

fn set_dpi(&self, x: f32, y: f32)

fn set_tags(&self, tag1: Tag, tag2: Tag)

fn set_text_antialias_mode(&self, mode: TextAntialiasMode)

fn set_text_rendering_params(&self, params: Option<&RenderingParams>)

fn set_transform(&self, m: &Matrix3x2F)

Loading content...

Implementors

impl IRenderTarget for BitmapRenderTarget[src]

impl IRenderTarget for DCRenderTarget[src]

impl IRenderTarget for HwndRenderTarget[src]

impl IRenderTarget for RenderTarget[src]

Loading content...