API Documentation > CorelDRAW > 2025-v26 > Shape > IVGShape
Shape.CreatePerspective method
Creates a perspective effect
Syntax:
Function CreatePerspective(Optional ByVal HorizVanishPointX As Variant, Optional ByVal HorizVanishPointY As Variant, Optional ByVal VertVanishPointX As Variant, Optional ByVal VertVanishPointY As Variant) As Effect
Parameters:
Name Type Description
HorizVanishPointX
Variant
HorizVanishPointY
Variant
VertVanishPointX
Variant
VertVanishPointY
Variant
Remarks:
The CreatePerspective method applies a perspective to a shape, returning an Effect object that represents the perspective properties.
Examples:
The following VBA example creates a three-dimensional cube with checkerboard sides.
Sub Test()
Dim sGrid As Shape, s As Shape
Dim b As Boolean, n As Long
Set sGrid = ActiveLayer.CreateGridBoxes(1.549724, 7.436693, 3.067677, 5.91874, 4, 4)
b = True
n = 0
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
  n = n + 1
  If (n Mod 4) <> 0 Then b = Not b
  Next s
  Set s = sGrid.Duplicate
  s.SetBoundingBox 1.549724, 7.436693, 1.517953, 0.451447
  s.CreatePerspective , , 6.984024, 9.839248
  Set s = sGrid.Duplicate
  s.SetBoundingBox 3.068583, 5.91874, 0.7395965, 1.517953
  s.CreatePerspective 6.984024, 9.839248

End Sub