Active
Project:
Drawing API
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
20 Apr 2011 at 06:42 UTC
Updated:
14 Jan 2013 at 18:19 UTC
Jump to comment: Most recent file
Is there something in plan for a drupal 7 port of this module?
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | druplicon-with-text.png | 27.73 KB | danielb |
| #7 | gd_generated_druplicon_proper.png | 14.86 KB | danielb |
| #5 | gd_generated_druplicon.png | 12.91 KB | danielb |
Comments
Comment #1
summit commentedSubscribing, would love to see this for D7!
Greetings, Martijn
Comment #2
danielb commentedPorting it would be quite easy, however the module was never fully finished :/
Comment #3
danielb commentedI'm going to go through the Drupal 6 version and see what needs to be done and come up with a plan. I suspect the future of this module will be to embrace HTML5, though a port to Drupal 7 is unlikely to contain new features initially.
Comment #4
danielb commentedI've been working on improvements to the Drawing API, and implementing the missing features of the GD toolkit. Hopefully I can get it to a point where it will make sense to port and move on with features.
Comment #5
danielb commentedWoohoo I have SVG paths drawing through PHP GD, it looks funny though because I haven't done the maths for curves.
Comment #6
snufkin commentedwow nice job!
Comment #7
danielb commentedAwesome I got bezier curves working, first GD drawing with proper beziers, imagine what I could get done if everyday was christmas
Comment #8
danielb commentedUpdate; I've put elliptical arcs in but they're slightly buggy, at least the arc I drew appears rotated 12.5 degrees too far, and I can't figure out why. I have also put text in, and that probably will need some work too, but I'm getting the major bits in place.
The next bit is groups/transformation and I think that's the last main thing to add support for before porting. I know once we've ported to 7; the motivation to add such a major feature to a previous drupal versions goes down heaps.
Here's druplicon with text (and a couple text styles). Since it doesn't support groups/transformations yet the text about overlapping elements is pretty funny.
PS: on the topic of ordering, I discovered if you set #sorted = TRUE on the canvas/group/path-element it takes all the surprises out of ordering child elements - except then it ignores #weight and just goes on the order in the array.
Comment #9
danielb commentedTransformations are hard! Took me a couple days to work out the equations and algorithms but even having those... you can't simply apply it to the GD suppliable coordinates of a rectangle or circle and expect all matrices will work. I would expect that it works for polygons and polylines (which I'm also piggybacking off of to do paths) so I think all shapes will have to be done as a polygon for fill and polyline for stroke, because that seems to make more sense as far as transformations go.
Transforming text and embedded graphics, that's going to be the fun part. Each pixel would have to be transformed, which seems like a done thing, but won't be very fast. Then you gotta think about overlapping pixels and interpolating pixels and stuff like that. Should be an eye opening experience.
The other issue with transformations is handling when the transformation makes something really big or sets the coordinates into the negative.
Comment #10
danielb commentedWell I'm probably not gonna work out those little problems soon, so I've moved onto the Drupal 7 port. I've done a coder upgrade but there are still things it didn't catch, and since this project uses the theme system heavily and that has been totally changed I guess thats where most of the work will be.
Comment #11
InteGer commentedAny update on the D7 version?