Problem with Gdiapi TestCase 225: LineTO



Hi All,

I am trying to accelerate The GDI function DrvStrokePath for drawing
Lines using a proprietory algorithm. But my proprietory solution for
drawing lines is not pixel accurate with the GDI Line Drawing Function
which uses Bresenham's algorithm. The horizontal and vertical lines are
pixel accurate though. Problem is with Diagonal lines only.

So although some of the GdiApi Test cases pass, a particular test case
id 225 "LineTo" sometimes fails. It fails in a particular use case
which is RandomLineToTest, which draws line between random coordinates.
SO although some TestCases Like TestCase id 210 which draws Polygon and
id 211 polyline pass, even though my lines are not pixel accurate, the
test case id 225 arbtirarily passes or fails.

I have already seen that for Horizontal and Vertical lines, variance
from Bresenham's algorithm is 0. I wanted to know what is the maximum
variance allowed from the standard Bresenham's algorithm for drawing
diagonal lines, in order to pass the Test Case. And can this variance
limit be increased.

Any help in this regard is highly appreciated.

Gaurav Jairath

.



Relevant Pages

  • Re: Drawing lines of variable widths
    ... "This version of the demo only supports the drawing of lines in the ... I originally coded the algorithm in 1976, but when I published the web ... This is an easy thing to do when I want to draw a line of zero or no ... The algorithm supports non-integer pen thicknesses. ...
    (comp.graphics.misc)
  • Re: Programmable pulse generator
    ... Bresenham invented famous algorithms for efficiently drawing lines and circles on bitmaps. ... The point here is to realized that the line drawing algorithm can be used for any kind of scaling with factors less than one. ... eps -= Y; ...
    (comp.arch.fpga)
  • Re: Drawing a line - point by point
    ... > I used to have an algorithm for drawing a line pixel by pixel but a ... Alas, Alas, you've probably not been searching for the right thing. ... far and away the fastest alogirhtm is the Bresenham line drawing ...
    (comp.lang.pascal.delphi.misc)
  • Re: High spped drawing with MFC is it possible?
    ... Data drawing function first calculates the location of point on screen ... algorithm so that it first determines whether a point overlaps other points ...
    (microsoft.public.vc.mfc.docview)