![]() |
|
![]() |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
I figured out how to do the "StartColor" and "EndColor", alot of this is self explainitory, but the middle colors in a custom fountain fill are not. Using the help files I came up with...
Code:
Set ff = ActiveShape.Fill.Fountain For Each s In ActiveSelection.Shapes If s.Fill.Type = cdrFountainFill Then For i = 0 To ff.Colors.Count + 1 c.CopyAssign ff.Colors(i).Color c.ConvertToCMYK If ComboBox2 = "Yellow" Then s.Fill.Fountain.Colors(i).Color.FixedAssign cdrPANTONECoated, 1, (c.CMYKBlack) Next i End If Next s What I want it to do is go through every color in the middle of a fountain fill (Only because the 'count' wont include the first and last) and change the CMYKBlack (tint and all) to the selection of ComboBox2. I hope I explained it ok. Any clues? Thanks Again!! This is very helpfull. ________ Iolite vaporizer review Last edited by Steve; 12-03-2011 at 00:29. |
#2
|
||||
|
||||
![]()
Steve,
I'm not sure what kind of problem you have here. You seem to have located a proper piece of code for your purpose. Shape.Fill.Fountain.Colors is the collection containing all fill colors. It is not a normal collection in a sense that it has a "dual" nature. All collections in the object model start with item #1 to the number of elements in the collection as identified by Count property of the collection. FountainFill.Colors lists all intermediate colors as items 1 to Count. However it has two more elements - #0 and #(Count+1) which represent the start and end color of a fountain fill. So if you use the collection in a normal way like: Code:
For Each fclr in ActiveShape.Fill.Fountain.Color Code:
For i = 1 to ActiveShape.Fill.Fountain.Colors.Count Set fclr = ActiveShape.Fill.Countain.Colors(i) Code:
For i = 0 to ActiveShape.Fill.Fountain.Colors.Count+1 Set fclr = ActiveShape.Fill.Countain.Colors(i) |
#3
|
|||
|
|||
![]()
Hi Alex
Thanks for your help. First... Code:
Set ff = ActiveShape.Fill.Fountain For Each s In ActiveSelection.Shapes If s.Fill.Type = cdrFountainFill Then For i = 0 To ff.Colors.Count + 1 c.CopyAssign ff.Colors(i).Color c.ConvertToCMYK If (c.CMYKBlack >= 1 And c.CMYKCyan = 0 And _ c.CMYKMagenta = 0 And c.CMYKYellow = 0) Then If ComboBox2 = "Yellow" Then s.Fill.Fountain.Colors(i).Color.FixedAssign cdrPANTONECoated, 1, (c.CMYKBlack) End If End If Next i End If Next s ![]() Anyway, the program should.. -look for a fountain fill -get the colors -convert them to CMYK if needed (but they dont need to be I used it for the New Color) -find out the value of the colors (in this case Black, tint 1 to 100) -fill that color position with the chosen color (in this case Yellow) with the tint matching the tint of the found colors (black on the template) -move on to the next I hope that is a good explaination. I have another small delema, but not critical. We'll get to it later. ![]() Thanks for your help. It's very appreciated! ________ Portable vaporizer Last edited by Steve; 12-03-2011 at 00:29. |
#4
|
|||
|
|||
![]() Code:
For Each s In ActivePage.Shapes If s.Fill.Type = cdrFountainFill Then Set ff = s.Fill.Fountain For i = 0 To ff.Colors.Count + 1 ff.Colors(i).Color.ConvertToCMYK If (ff.Colors(i).Color.CMYKBlack >= 1 And _ ff.Colors(i).Color.CMYKCyan = 0 And _ ff.Colors(i).Color.CMYKMagenta = 0 And _ ff.Colors(i).Color.CMYKYellow = 0) Then If ComboBox2 = "Yellow" Then ff.Colors(i).Color.FixedAssign _ cdrPANTONECoated, 1, (ff.Colors(i).Color.CMYKBlack) ![]() Thanks! ________ FOCUS (NORTH AMERICA) Last edited by Steve; 12-03-2011 at 00:29. |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
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 |