Name | Description | |
---|---|---|
DPIUtils Constructor |
The following tables list the members exposed by DPIUtils.
Name | Description | |
---|---|---|
DPIUtils Constructor |
Name | Description | |
---|---|---|
CurrentDPI | Get the current DPI of the application environement. | |
ScaleFactor |
Name | Description | |
---|---|---|
GetBitmap | Overloaded. Get the specified scale Bitmap of specified Bitmap resource. The result Bitmap is scaled from the existing versions of the Bitmap resource of all DPI supporting scale versions (see GetDPISupportingScaleFactor). | |
GetDPISupportingScaleFactor | Get the array of scale factors that corresspond to the supporting DPIs. | |
GetExistingScaleResourceInfos | Get the list of existing scale versions of specified resource from the array of request scale versions. | |
GetIcon | Overloaded. Gets the icon from the specified resource. | |
GetImage | Overloaded. Get the specified scale Image of specified Image resource. The result Image is scaled from the existing versions of the Image resource of all DPI supporting scale versions (see GetDPISupportingScaleFactor(void)). | |
GetScaleResourcePaths | Get the path of scale versions from original path (1x version) of a specified resource. Note: The rule to form the path of scale version from original path (1x version) of a specified resource is: Add the ".(scaleFactor)x" to right before the "." that start the file extension. For example: 1.5x version of D:\abc.png is D:\abc.1.5x.png. | |
GetStream | Get the Stream of the specified resource. | |
IsResourceExists | Check if the specified resource exists in the specified assembly. If the specified assembly is null, check if the file specified by
resourcePath exists. | |
ScaleBitmap | Scale the original Bitmap with the specified scale factor. |