Monday, December 27, 2010

BUG - wumpus-core

I discovered a bug this afternoon in Wumpus-Core where ellipses are not drawn properly - the position of the center is miscalculated. Surprisingly this bug has been in place for quite a while, clearly I mustn't use ellipses very often with the higher-level stuff like Wumpus-Basic for it to go so long without being spotted.

I'm a bit hesitant about a fix as I think the best solution is probably to define PostScript procedures for drawing circles and ellipses, but this is something I've been reluctant to do - there are quite a lot of opportunities to go wrong, especially with EPS files which have special concerns for variables. 


% Filled ellipse
/FELL     % X Y RX RY FELL
{
  /RY exch def
  /RX exch def
  /Y  exch def
  /X  exch def
  X Y translate
  1 RY RX div scale
  newpath
  0 0 RX 0.0 360.0 arc
  closepath
  fill
  1 RX RY div scale
  X neg Y neg translate
} bind def

Blog Archive

About Me

My photo
Disambiguating biog as there are a few Stephen Tetley's in the world. I'm neither a cage fighter or yachtsman. I studied Fine Art in the nineties (foundation Bradford 1992, degree Cheltenham 1992 - 95) then Computing part-time at Leeds Met graduating in 2003. I'm the Stephen Tetley on Haskell Cafe and Stackoverflow.