OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > Corel Photo-Paint VBA

Thread Tools Search this Thread Display Modes
Old 06-04-2004, 13:11
Michael Cervantes
Posts: n/a
Default Gradient Fill

In this command to fill gradients

Sub GradientPoint(Index As Long, PtX As Long, PtY As Long, ColorModel As Long, Color1 As Long, Color2 As Long, Color3 As Long, Color4 As Long, Transparency As Long)

What is PtX and PtY?

How to calculate it?

Thanks for your time and attention.
Reply With Quote
Old 08-04-2004, 09:05
Alex's Avatar
Alex Alex is offline
Join Date: Nov 2002
Posts: 1,941
Blog Entries: 4
Default Re: Gradient Fill

Well, PtX and PtY are the coordinates of actual color handles of the fountain vector. Depending on the type of the fill (linear, radial, conical, etc), the handles are placed differently. Once you know the coordinates of the beginning and the end of the vector (StartX, StartY) and (EndX, EndY), the intermediate positions can be determined as follows:

PtX = StartX + (EndX - StartX) * Pos / 100
PtY = StartY + (EndY - StartY) * Pos / 100
Where Pos is the relative position of the color point (from 0 to 100) as in the fountain fill dialog.

The ideal solution would be just to record the script but unfortunately it seems that the recorder doesn't handle it properly - it records only the first two points for some reason.
Reply With Quote

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
object lost it's linear fountain fill property after metalickaah CorelDRAW/Corel DESIGNER VBA 5 02-01-2005 22:36
Try to capture a fill color for reuse Anonymous CorelDRAW CS 1 03-05-2004 20:48
Gradient + Break Apart Hernán New product ideas 6 25-04-2004 14:34
fill type jwknight CorelDRAW/Corel DESIGNER VBA 1 04-03-2004 13:47
How can I change middle colors in a custom Fountain Fill Steve CorelDRAW/Corel DESIGNER VBA 3 13-12-2002 19:11

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

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