ICanvasResourceCreatorWithDpi Interface |
Namespace: Microsoft.Graphics.Canvas
public interface ICanvasResourceCreatorWithDpi : ICanvasResourceCreator
The ICanvasResourceCreatorWithDpi type exposes the following members.
Name | Description | |
---|---|---|
Device | The device that will be used to create resources. (Inherited from ICanvasResourceCreator.) | |
Dpi | Gets the dots-per-inch (DPI) of this object. |
Name | Description | |
---|---|---|
ConvertDipsToPixels | Converts units from device independent pixels (DIPs) to physical pixels based on the current DPI of this object. | |
ConvertPixelsToDips | Converts units from physical pixels to device independent pixels (DIPs) based on the current DPI of this object. |
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.