Skip to content
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

Add support for linear and radial gradients #29

Closed
andymeneely opened this issue Jan 14, 2015 · 3 comments
Closed

Add support for linear and radial gradients #29

andymeneely opened this issue Jan 14, 2015 · 3 comments
Milestone

Comments

@andymeneely
Copy link
Owner

Would be nice if we could do gradients instead of fill colors for background and the various shapes. Cairo supports multiple stops, which makes them quite variable

Here are the examples/ideas:

background gradient: { x1: 0, y1:0, 
                       x2: 500, y2: 500, 
                       colors: {0.0: :red, 
                                1.0: :blue }
                     }

It would be the first time we would have the inputs be hashes within hashes (within hashes). Is that too complex? Is there another way?

Or... do we just say "use SVG". Perhaps that would keep things simpler.

@andymeneely
Copy link
Owner Author

Or perhaps translate colors? That would make the syntax easier I think. Everywhere colors are specified, you can specify gradients too. Maybe accept the hash syntax, but also a more natural string syntax. Such as:

"(x1,y1) (x2,y2) blue [0.1] #abc [1.0]"

@scraimer
Copy link

Either option sounds good, although I suspect that the hashes-within-hashes might conform better to how you've been implementing the deck: that is, that everything is arrays and each item in the array is used in a single card.

The string method is probably less convoluted to use, though.

@andymeneely andymeneely added this to the v0.3 milestone Jan 27, 2015
andymeneely added a commit that referenced this issue Jan 27, 2015
@andymeneely
Copy link
Owner Author

I went with just the string formatting. Mult-level hashes complicate things more than I want to deal with at this point. It'll be in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants