OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Corel User Forums > CorelDRAW > Macros/Add-ons

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-03-2012, 04:52
grzjanik grzjanik is offline
Member
 
Join Date: Mar 2010
Location: Lodz, Poland
Posts: 86
Send a message via Skype™ to grzjanik
Default Convert lenses to bitmaps - help

Hi, guys.

Sorry for my english.

I'm use Corel 12 and have problem with powerclips.
Alex's code (thanks Alex) converts all lenses to bitmaps on the Active.page.
Unfortunately bitmap in powerclips change size and position.
I don't know why.

Code:
Quote:
Sub ConvertLensesWithTransTest()
Dim s As Shape, sr As ShapeRange
Set sr = ActivePage.Shapes.FindShapes()
For Each s In sr
If Not s.Effects.LensEffect Is Nothing Then
s.ConvertToBitmapEx cdrCMYKColorImage, True, True, 300, cdrNormalAntiAliasing, True
End If
Next s
End Sub
Screens before and after:



Please any help.

Regards.

~GrzJanik
Reply With Quote
  #2  
Old 09-03-2012, 09:09
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,791
Blog Entries: 15
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Lens CorelDRAW 12

If I recall CorelDRAW 12 had issues with powerclips and lenses. The code you have should not see the lens in the powerclip at all, it should just ignore it.

-Shelby
Reply With Quote
  #3  
Old 09-03-2012, 09:51
grzjanik grzjanik is offline
Member
 
Join Date: Mar 2010
Location: Lodz, Poland
Posts: 86
Send a message via Skype™ to grzjanik
Default Powerclips

Thanks Shelby/

How to skip the powerclips?
Reply With Quote
  #4  
Old 09-03-2012, 14:48
grzjanik grzjanik is offline
Member
 
Join Date: Mar 2010
Location: Lodz, Poland
Posts: 86
Send a message via Skype™ to grzjanik
Default Powerclips

Maybe instead of skip powerclips, do this:

1. search for shapes (and convert lenses)
2. if found PowerClip - enter edit mode
3. search for shapes (and convert lenses)
4. if there are no lenses - leave edit mode
5. search for shapes (and convert) next
6. and so to the end of the page

Then the change will apply to all objects on the page.

Is this possible?

This is very important for me.

Thanks for help.
~GrzJanik

Last edited by grzjanik; 10-03-2012 at 10:28.
Reply With Quote
  #5  
Old 13-03-2012, 08:00
grzjanik grzjanik is offline
Member
 
Join Date: Mar 2010
Location: Lodz, Poland
Posts: 86
Send a message via Skype™ to grzjanik
Default Help

Maybe some other solution to get the desired effect?

~GrzJanik
Reply With Quote
  #6  
Old 15-03-2012, 21:27
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,791
Blog Entries: 15
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Powerclip and Lens

Alright, I had a little time to look at this, give this a try. The only issue with this code is that it will not dig into groups.
Code:
Sub ConvertLensesWithTransTest()
    Dim s As Shape, ss As Shape
    
    For Each s In ActivePage.Shapes
        If Not s.PowerClip Is Nothing Then
            s.PowerClip.EnterEditMode
                For Each ss In s.PowerClip.Shapes
                    If Not ss.Effects.LensEffect Is Nothing Then
                        ss.ConvertToBitmapEx cdrCMYKColorImage, True, True, 300, cdrNormalAntiAliasing, True
                    End If
                Next ss
            s.PowerClip.LeaveEditMode
        Else
            If Not s.Effects.LensEffect Is Nothing Then
                s.ConvertToBitmapEx cdrCMYKColorImage, True, True, 300, cdrNormalAntiAliasing, True
            End If
        End If
    Next s
End Sub
Best of luck,

-Shelby
Reply With Quote
  #7  
Old 19-03-2012, 08:52
grzjanik grzjanik is offline
Member
 
Join Date: Mar 2010
Location: Lodz, Poland
Posts: 86
Send a message via Skype™ to grzjanik
Default Yeah

Thanks Shelby.

Thats great work!

This is code works with groups:

Quote:
Sub ConvertLensesWithTrans()
Dim s As Shape, ss As Shape, sr As ShapeRange
Set sr = ActivePage.Shapes.FindShapes()
For Each s In sr
On Error Resume Next
If Not s.PowerClip Is Nothing Then
s.PowerClip.EnterEditMode
For Each ss In s.PowerClip.Shapes
If Not ss.Effects.LensEffect Is Nothing Then
ss.ConvertToBitmapEx cdrCMYKColorImage, True, True, 300, cdrNormalAntiAliasing, True
End If
Next ss
s.PowerClip.LeaveEditMode
Else
If Not s.Effects.LensEffect Is Nothing Then
s.ConvertToBitmapEx cdrCMYKColorImage, True, True, 300, cdrNormalAntiAliasing, True
End If
End If
Next s
End Sub
Best of luck,

~GrzJanik

PS. When pasting text in the quote my tabs is disappear, why?
Reply With Quote
  #8  
Old 19-03-2012, 11:23
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,791
Blog Entries: 15
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Formatting

Don't use Quote, use Code. :-) It will keep the formatting.

-Shelby
Reply With Quote
  #9  
Old 20-03-2012, 02:33
grzjanik grzjanik is offline
Member
 
Join Date: Mar 2010
Location: Lodz, Poland
Posts: 86
Send a message via Skype™ to grzjanik
Default Thank You

Code:
Sub Thanks_Shelby()

    Msgbox "I'll remember."
        
        ' :)  

End Sub
Regards.

~GrzJanik
Reply With Quote
Reply

Tags
bitmap, lens, powerclip


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to convert all lenses in document to no lens gorgo CorelDRAW/Corel DESIGNER VBA 2 12-01-2012 09:44
convert all bitmaps to 16-bit grayscale images keytecstaff CorelDRAW/Corel DESIGNER VBA 3 18-12-2008 13:18
How open some bitmaps in one CPP? dizzzy Macros/Add-ons 0 31-10-2007 12:22
Trace Bitmaps keytecstaff CorelDRAW/Corel DESIGNER VBA 5 24-05-2006 09:26
how can we convert all lenses in document to cmyk bitmap? olympiatr CorelDRAW/Corel DESIGNER VBA 2 27-05-2005 04:11


All times are GMT -5. The time now is 06:55.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com