---
title: "UnitConverter.ConvertUnitsToPixels Method "
canonical: https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_UnitConverter_ConvertUnitsToPixels_3_1df1b0a2.htm
product: "Graphics Mill"
---

# UnitConverter.ConvertUnitsToPixels Method 
 
Converts a value measured in specified device-independent unit to pixels.
 
**Namespace:** [Aurigma.GraphicsMill](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```csharp
public static int ConvertUnitsToPixels(float resolution,float sourceValue,Unit sourceUnit
)
```
 
### Parameters
 
 - resolution
     - Type: System.Single
A resolution in DPI used to convert *sourceUnit* to pixels.

 - sourceValue
     - Type: System.Single
A value measured in *sourceUnit* which should be converted to pixels.

 - sourceUnit
     - Type: [Aurigma.GraphicsMill.Unit](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Unit.htm.md)
A source unit.
 
### Return Value
A value converted to pixels.
   
## See Also

### Reference

- [UnitConverter Class](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_UnitConverter.htm.md)
- [Aurigma.GraphicsMill Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill.htm.md)
