Click or drag to resize
ICanvasResourceCreatorWithDpi Interface
Represents an object that can create graphics resources, and which has a specific DPI. Implemented by CanvasControl and CanvasDrawingSession.

Namespace:  Microsoft.Graphics.Canvas
Assembly:  Microsoft.Graphics.Canvas (in Microsoft.Graphics.Canvas.dll) Version: 0.0.0.0
Syntax
C#
public interface ICanvasResourceCreatorWithDpi : ICanvasResourceCreator

The ICanvasResourceCreatorWithDpi type exposes the following members.

Properties
  NameDescription
Public propertyDevice
The device that will be used to create resources.
(Inherited from ICanvasResourceCreator.)
Public propertyDpi
Gets the dots-per-inch (DPI) of this object.
Top
Methods
  NameDescription
Public methodConvertDipsToPixels
Converts units from device independent pixels (DIPs) to physical pixels based on the current DPI of this object.
Public methodConvertPixelsToDips
Converts units from physical pixels to device independent pixels (DIPs) based on the current DPI of this object.
Top
Remarks

Some objects (eg. CanvasDevice) can be used simultaneously to draw at many different DPI (dots-per-inch) settings, but others (eg. CanvasControl) are fixed to a specific DPI. This interface represents things that have a specific DPI. When other resources are created from it they can automatically inherit this DPI, whereas when a resource that cares about DPI is created directly from a device, the DPI must be explicitly specified.

For more information, see DPI and DIPs.

See Also