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 18-08-2006, 16:18
wangor
Guest
 
Posts: n/a
Default Help with script - cropping bitmap

Hi,

I use CorelDRAW 12, and i'm completly new to it, and to VBA scripts.

I've got a shape named "rect" which stores a rectangle and a shape named "box" which stores a bitmap.

I want to crop away every part of "box" that is out of "rect". In other words - i want to remove part of bitmap "box" that sticks out of rectangle "rect".

I have no idea how to do this, i guess it could be done with
ActiveLayer.FindShape("Rect").Bitmap.Crop
but i have no idea how to set "clipping path".
(quote manual: "The Crop method crops the bitmap to its clipping path.")

My questions are:
How to use Shape.crop() ?
What is and how to set clipping path from VBA script level?
Is there any other way to solve my problem?

I tried to use recording, i cropped the bitmap while doing so, but only code that was generated was comment " 'Recording of this command is not supported"

I'd be very grateful if you could paste some code examples.

Thanks in advance.
Reply With Quote
  #2  
Old 18-08-2006, 21:31
sallybode
Guest
 
Posts: n/a
Default

The way cropping works in 12 is that you use the node editor, and marquis select two nodes on the same side. Then, holding the Ctrl key, (this constrains the movement to horizontal or vertical) you drag to where the photo should be cropped. Repeat procedure any other side which needs cropping. When you have it as you like it, go "Bitmaps/Crop Bitmap", or you can use the Property Bar icons for the same action.

X3's cropping is easier: it works just as the familiar crop tool in bitmap editing programs and also crops vectors. This is a really useful upgrade.

Rather than cropping, you could also PowerClip the bitmaps inside the size rectangle you want. It doesn't get rid of the excess pixels. It is a good choice for comps until the client makes their final decision.

Note on that: clients are notorious for changing their minds, even after you are sure it is a go. Once you have cropped, you can kiss the remnant you tossed away for good.
Reply With Quote
  #3  
Old 19-08-2006, 20:20
wangor
Guest
 
Posts: n/a
Default

PowerClip works very well.

All solved with Box.AddToPowerClip Rect

Thanks for help.
Reply With Quote
Reply


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
NEED HELP ON CORELDRAW SCRIPT. FREE PHOTO CALENDAR IF U CAN! johnlfitz CorelDRAW/Corel DESIGNER VBA 8 06-06-2008 23:59
Replacing bitmap color mode xenio CorelDRAW/Corel DESIGNER VBA 2 29-04-2007 04:12
Turning on color calibration in a Corel Script Alien2001 CorelDRAW CS 2 14-07-2005 00:34
VB script to save JPG (photopaint12) tonywong Corel Photo-Paint VBA 2 17-05-2005 09:27
problem with script or macro. Dr Morpheus CorelDRAW/Corel DESIGNER VBA 1 12-02-2004 14:46


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


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