-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't assign an ordered list of colors to Path.vertexColors() #160
Comments
Hi, Also, if you want to iterate over a HColorPool, there is a .getColorAt(int index) method that will work for this. |
Ah, I reproduced the problem. The color is applied additively, & the default fill is #FFFFFF. Try setting an initial fill to something close to #000000. |
Thanks for replying @echophon ! The problem with using HColorPool is that in HPath's draw() it will use automatically HColorPool.getColor() to get a random color. So I can't use getColor(index) unless I create a new class extending HPath to change that draw() function code. Thanks for the HColorField example, I hadn't looked into it completely.
As you can see, I tried placing the vertexColors call all over the place, no success... Still stumped... |
Have suggested an update to address...#162 |
@DonoG fantastic stuff, now I won't need to use my overloaded Path class anymore ;) |
Trying to assign an ordered list of colors to vertexColors(HColorist clr).
Can't do it by passing a HColorPool since it returns a random color from its list.
Then thought I could use HColorField to have an ordered list of gradients that get passed to vertexColors, but simply substituting the HColorPool var with an HColorField one doesn't work: the output is that my shapes are white. Code being:
Any idea how to make HColorField work with vertexColors, or any other way to pass in an ordered list of colors?
Thanks!
The text was updated successfully, but these errors were encountered: