![]() |
![]() |
Shape.CreateLens
Function CreateLens(Type As cdrLensType, [RateOrMagnification As Double = 50], [Color1 As Color], [Color2 As Color], [ColorMapPalette As cdrFountainFillBlendType = cdrDirectFountainFillBlend]) As Effect
Member of Shape
The CreateLens method applies a lens effect to a shape. This method returns an Effect object that represents lens-effect properties.
Parameters
|
Description
|
Type
|
Specifies the type of lens. This property returns cdrLensType.
|
RateOrMagnification
|
Refers to values between 0 and 100% that increase the degree of a lens effect. The Rate property applies to the following lens effects: Brighten, Color add, Color limit, Fish eye, and Transparency.
This parameter is optional, and its default value is 50.
|
Color1
|
Specifies the starting color in a Custom Color Map lens effect
This parameter is optional, and its default value is Nothing.
|
Color2
|
Specifies the ending color in a Custom Color Map lens effect
This parameter is optional, and its default value is Nothing.
|
ColorMapPalette
|
Specifies the type of color map palette. This value returns cdrFountainFillBlendType.
This parameter is optional, and its default value is cdrDirectFountainFillBlend (0).
|
The following code example creates a checkerboard and draws a Fish eye lens on top of it:
Sub Test() Dim sGrid As Shape, s As Shape Dim b As Boolean Set sGrid = ActiveLayer.CreateGridBoxes(1.748504, 8.41252, 4.712126, 5.430827, 5, 5) b = True For Each s In sGrid.Shapes If b Then s.Fill.UniformColor.RGBAssign 0, 0, 0 Else s.Fill.UniformColor.RGBAssign 255, 255, 255 End If b = Not b Next s Set s = ActiveLayer.CreateEllipse(1.748504, 8.41252, 4.712126, 5.430827, 90#, 90#, False) s.CreateLens cdrLensFishEye, 100 End Sub
![]() |
![]() |
![]() |
Copyright 2007 Corel Corporation. All rights reserved.