API Documentation > CorelDRAW > 2025-v26 > Shape > IVGShape
Shape.ConvertToBitmapEx method
Converts a shape to a bitmap
Syntax:
Function ConvertToBitmapEx(Optional ByVal Mode As cdrImageType = cdrRGBColorImage, Optional ByVal Dithered As Boolean = False, Optional ByVal Transparent As Boolean = False, Optional ByVal Resolution As Long = 72, Optional ByVal AntiAliasing As cdrAntiAliasingType = cdrNormalAntiAliasing, Optional ByVal UseColorProfile As Boolean = True, Optional ByVal AlwaysOverprintBlack As Boolean = False, Optional ByVal OverprintBlackLimit As Long = 95) As Shape
Parameters:
Name Type Description
Mode
{cdrImageType|Specifies the image type, and returns cdrImageType.
Dithered
Boolean
Enables dithering if set to True (-1).
Transparent
Boolean
Enables a transparent background if set to True (-1).
Resolution
Long
Specifies the resolution.
AntiAliasing
Specifies the anti-aliasing, and a value of returns cdrAntiAliasingType.
UseColorProfile
Boolean
Uses a color profile if set to True (-1).
AlwaysOverprintBlack
Boolean
OverprintBlackLimit
Long
Remarks:
The ConvertToBitmapEx converts a shape to a bitmap.
Examples:
The following VBA example creates a rectangle and an ellipse. Then it converts the ellipse to a CMYK bitmap with a transparent background, applies a dropshadow to it, and groups it with the rectangle.
Sub Test()
Dim r As Shape, s As Shape
Set r = ActiveLayer.CreateRectangle(0, 0, 5, 5)
r.Fill.UniformColor.CMYKAssign 100, 0, 0, 0
Set s = ActiveLayer.CreateEllipse2(3, 3, 2)
s.Fill.UniformColor.CMYKAssign 0, 100, 100, 0
Set s = s.ConvertToBitmapEx(cdrCMYKColorImage, False, True)
s.CreateDropShadow cdrDropShadowFlat, 80, 10, 0.5, -0.5, CreateCMYKColor(0, 50, 50, 50)
r.CreateSelection
s.Selected = True
ActiveSelection.Group 
End Sub