Item10778: Gauges don't work with some versions of GD

pencil
Priority: Urgent
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: GaugePlugin
Branches:
Reported By: CrawfordCurrie
Waiting For:
Last Change By: CrawfordCurrie
I have two servers with GD installed, and both exhibit the problem that when GD::Polygon is called, I get an uninitialised variable error in the midst of the code. Tracking it back, it's due to the lack of two undocumented parameters to GD::Polygon->scale. The call that is there is correct according to the docco, but when you read down through the code it's bound to cause an uninitalised var :-(.

Relevant code:
  • GD version 2.45
  • GaugePlugin.pm: 271 (works if you add , 0, 0 to the parameters)
  • GD::Polygon: 180 -> 173 falls over because $tx, $ty are undefined

As far as I can see the error is clearly in the GD code. But I don't understand how GaugePlugin can ever have worked (or how GD works, for that matter!).

As I said, changing GaugePlugin.pm:271 to:
    $poly->scale( $xscale, 1, 0, 0 );
cures the problem (or at least masks it)

This code is identical in GD 2.46 (the latest)

-- CrawfordCurrie - 26 May 2011

Put the fix described above in. Seems ok on all revs of GD I tested.

-- CrawfordCurrie - 14 Jun 2011

 

ItemTemplate edit

Summary Gauges don't work with some versions of GD
ReportedBy CrawfordCurrie
Codebase
SVN Range
AppliesTo Extension
Component GaugePlugin
Priority Urgent
CurrentState Closed
WaitingFor
Checkins GaugePlugin:74a30100597d
TargetRelease n/a
ReleasedIn n/a
Topic revision: r4 - 14 Jun 2011, CrawfordCurrie
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy