Struct native_windows_gui::Canvas [] [src]

pub struct Canvas<ID: Clone + Hash> { /* fields omitted */ }

A blank control that can be painted to

Methods

impl<ID: Clone + Hash> Canvas<ID>
[src]

Make the canvas "paint ready" and return an object to paint to it. In very very very rare case, the renderer creation can fail.

Create a solid brush into the canvas and add it under the selected name.

Errors:
Error::System if the canvas could not create the brush.
Error::KeyExists if the a resource with the specified name already exists

Create a pen into the canvas and add it under the selected name.

Errors:
Error::System if the canvas could not create the brush.
Error::KeyExists if the a resource with the specified name already exists

Redraw the canvas

Set the render target resolution.
If the control size do not match the render target size, the result will be upscaled or downscaled

Return the render target's dots per inch (DPI).

Sets the dots per inch (DPI) of the render target.

Arguments:
dpix: A value greater than or equal to zero that specifies the horizontal DPI of the render target.
dpiy: A value greater than or equal to zero that specifies the vertical DPI of the render target.

Methods from Deref<Target = ID2D1HwndRenderTarget>

Trait Implementations

impl<ID: Clone + Hash> Control for Canvas<ID>
[src]

Should return the underlying handle to the object

Should return the type of the control. For custom controls, the return value should be Undefined (the default).

If specified, should free any ressource allocated in the template build function. This includes functions like DestroyWindow.

impl<'a, ID: Clone + Hash> Deref for Canvas<ID>
[src]

The resulting type after dereferencing

The method called to dereference a value

impl<'a, ID: Clone + Hash> DerefMut for Canvas<ID>
[src]

The method called to mutably dereference a value