Previous Document Next Document

Object Model Reference : Classes : S : Shape : Methods : Shape.ConvertToBitmapEx


Shape.ConvertToBitmapEx

Function ConvertToBitmapEx([Mode As cdrImageType = cdrRGBColorImage], [Dithered As Boolean = False], [Transparent As Boolean = False], [Resolution As Long = 72], [AntiAliasing As cdrAntiAliasingType = cdrNormalAntiAliasing], [UseColorProfile As Boolean = True]) As Shape

Description

Member of Shape

The ConvertToBitmapEx converts a shape to a bitmap.

Parameter
Description
Mode
Dithered
Enables dithering if set to True (-1). This parameter is optional, and its default value is False.
Transparent
Enables a transparent background if set to True (-1). This parameter is optional, and its default value is False.
Resolution
Specifies the resolution. This parameter is optional, and its default value is 72.
AntiAliasing
Specifies the anti-aliasing, and a value of returns cdrAntiAliasingType. This parameter is optional, and its default value is cdrNormalAntiAliasing (1).
UseColorProfile
Uses a color profile if set to True (-1). This parameter is optional, and its default value is True.

VBA example

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.