schwarzerGolf
Programmer
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
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