Hello, greetings to everyone,
Can anybody describe how working the Perspective tool in Coreldraw?
I madea simple test with a square (1x1 inch) at 0,0 origin.
Here is the recorded vba:
Sub Macro1() ' Recorded 2018.03.21. Dim OrigSelection As ShapeRange Set OrigSelection = ActiveSelectionRange ActiveSelection.CreatePerspective ActiveSelection.CreatePerspective -1#, -1# ActiveSelection.CreatePerspective -1#, -1#, 1#, 1.5End Sub
^^BTW this macro doesn't work(s/ActiveSelection/OrigSelection(1)/).
This is seems working with the same values but different result:
Sub Macro2() Dim OrigSelection As ShapeRange Set OrigSelection = ActiveSelectionRange OrigSelection(1).CreatePerspective OrigSelection(1).CreatePerspective HorizVanishPointX:=-1#, HorizVanishPointY:=-1#, VertVanishPointX:=1#, VertVanishPointY:=1.5End Sub
Like this, but give another result:
Sub Macro3() Dim OrigSelection As ShapeRange Set OrigSelection = ActiveSelectionRange Dim eff1 As Effect Set eff1 = OrigSelection(1).CreatePerspective With eff1.Perspective .HorizVanishingPointX = -1# .HorizVanishingPointY = -1# .VertVanishingPointX = 1# .VertVanishingPointY = 1.5 End WithEnd Sub
What's wrong?