Re: High spped drawing with MFC is it possible?



that I have is whenever window needs update it takes considerable time for
window to redraw(even on a very fast computer) and it can be frustrating for
user. Data drawing function first calculates the location of point on screen
then uses pDC->LineTo() and pDC->MoveTo() functions to draw the plot. Well,
because of amount of data many points will overlap. When I modified the
algorithm so that it first determines whether a point overlaps other points
and if it does, skip this point then performance improved but still not
satisfactory.

So, how many lines are you actually drawing with your refined
algorithm? Have you tried using PolylineTo rather than drawing them
all individually?

I suspect that you need to profile your application to determine where
the lack of speed derives from - it may not be in the drawing itself
since you indicate that your improved algorithm hasn't made a
substantial difference.

Dave
.



Relevant Pages

  • Problem with Gdiapi TestCase 225: LineTO
    ... Lines using a proprietory algorithm. ... drawing lines is not pixel accurate with the GDI Line Drawing Function ...
    (microsoft.public.windowsce.platbuilder)
  • 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)