Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bug with QWin

Status
Not open for further replies.

schwarzerGolf

Programmer
Joined
Aug 30, 2006
Messages
1
Location
DE
Hi there,

I'm using QuickWin to draw some Vectors I calculated within my programme.
To draw the vector itself I draw the coordinate axis and then the vector-values into pixel-coordinates. The axis are there to scale the coordinate system.
The problem now is, that if the scale for y is too small, there is a line from top to bottom, which vanishes immediately, if I increase the scale for y. The problem does NOT exist, if I draw points (function: setpixel) instead of lines.
I could locate the point within my code, where I think the problem occurs, but I cannot find the bug.
Can you help me please?!?!

Here is the part of the programme:
do i=1, entries
xpix = int((x(i)-minx)*xscale)
ypix = int((y(i)-miny)*yscale)
xpix = xL_offset + xpix
ypix = ysize - yU_offset - ypix
if (i.eq.1) then
call moveto(xpix,ypix,xy)
else
if (modus.eq.1) then
status = setpixel(xpix,ypix)
elseif (modus.eq.2) then
line = lineto(xpix,ypix)
else
write(out,*) substr,'modus unknown',modus
STOP
endif
if (line.eq.0) then
write(out,*) substr,'Fehler beim Darstellen der Daten.'
write(out,*) substr,'Koordinaten prüfen'
call error(substr)
endif
endif
enddo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top