![]() |
#1
|
|||
|
|||
![]()
Hi All,
I've got an image already imported into a shape and I'm trying to powerclip it into another shape (which is a trapezoid rotated at x degree) and when I powerclip in, it is chopping off the top part of the image because the center of the shape on a horizontal plane is not the center of the trapezoid... Now that's clear is mud - so I try to rotate the trapezoid shape back to 0 degree, powerclip, then rotate back and I get an error... Here's a clip of the code. There's probably a better way - I've tried a few to no avail... Any help is greatly appreciated! Thanks much, Craig. For Each lolayer2 In mPage.Layers lnRotation = 0 lcLayerType = UCase(Left(lolayer2.Name, 3)) If lcLayerType = "RL_" Then lnRotation = Mid(lolayer2.Name, 4) Set sc = Nothing Set sc = lolayer2.FindShape("QC" & Mid(lcLookFor, 3)) If Not sc Is Nothing Then Set sPCClone = mCorel.ActiveSelection.Clone (Here, if you rotate before you powerclip - Corel Errors???) sc.Rotate (-lnRotation) sPCClone.AddToPowerClip (sc) sc.Rotate (lnRotation) Set sc = Nothing Set sPCClone = Nothing End If End If Next lolayer2 |
#2
|
||||
|
||||
![]()
why do you use .Clone method? it is not the same as .Duplicate. If you need ordinary copy of the object then use .Duplicate:
Code:
Set sc = lolayer2.FindShape("QC" & Mid(lcLookFor, 3)) If Not sc Is Nothing Then set sPCClone=sc.Duplicate |
#3
|
||||
|
||||
![]()
If I understand what you are saying this works for me. I did simplify everything like taking out your For Next loop. I also agree with wOxxOm Clone is not what you want to use.
Code:
Sub myTrapezoid() Dim dblRotation As Double Dim sShape As Shape Dim sTrapezoid As Shape Set sShape = ActivePage.FindShape(Name:="myShape") Set sTrapezoid = ActivePage.FindShape(Name:="myTrapezoid") dblRotation = sTrapezoid.RotationAngle sTrapezoid.RotationAngle = 0 sShape.AddToPowerClip sTrapezoid sTrapezoid.RotationAngle = dblRotation End Sub -Shelby |
#4
|
|||
|
|||
![]()
Hi wOxxOm and Shelby,
Thanks a ton for your responses-and they are very helpful. I probably should have asked this first for maybe even a better solution. Here's my delima: I have 3 trapezoid shapes rotated 60%, 180%, and 240% respectively in a circle. I want to import 3 images (jpg could be landscape or portrait) and power clip them into the trapezoids so the pictures completely fill the trapezoid and all the images facing the center of a circle. Once the trapezoid has been rotated, the center point is different than when it is at 0% - so I was trying to rotate back to 0, powerclip, then rotate back; but maybe that's not the best way (then you have the whole portait issue of not filling the whole trapezoid too) Thanks much for you help, Craig. |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | |
|
|