Is there something in plan for a drupal 7 port of this module?

Comments

summit’s picture

Subscribing, would love to see this for D7!
Greetings, Martijn

danielb’s picture

Porting it would be quite easy, however the module was never fully finished :/

danielb’s picture

Assigned: Unassigned » danielb

I'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.

danielb’s picture

I'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.

danielb’s picture

StatusFileSize
new12.91 KB

Woohoo I have SVG paths drawing through PHP GD, it looks funny though because I haven't done the maths for curves.

snufkin’s picture

wow nice job!

danielb’s picture

StatusFileSize
new14.86 KB

Awesome I got bezier curves working, first GD drawing with proper beziers, imagine what I could get done if everyday was christmas

danielb’s picture

StatusFileSize
new27.73 KB

Update; 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.

danielb’s picture

Transformations 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.

danielb’s picture

Well 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.

InteGer’s picture

Any update on the D7 version?