*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> standard/subpixel (3)              
Title
Content
Arch
Section
 

Contents


subpixel(3G)							  subpixel(3G)


NAME    [Toc]    [Back]

     subpixel -	controls the placement of point, line, and polygon vertices

C SPECIFICATION    [Toc]    [Back]

     void subpixel(b)
     Boolean b;

PARAMETERS    [Toc]    [Back]

     b	 expects either	FALSE or TRUE.

	 FALSE forces screen vertices to the centers of	pixels (default).

	 TRUE positions	screen vertices	exactly.

DESCRIPTION    [Toc]    [Back]

     subpixel controls the placement of	point, line, and polygon vertices in
     screen coordinates.  By default subpixel is FALSE,	causing	vertices to be
     snapped to	the center of the nearest pixel	after they have	been
     transformed to screen coordinates.	 Vertex	snapping introduces artifacts
     into the scan conversion of lines and polygons.  It is especially
     noticable when points or lines are	drawn smooth (see pntsmooth and
     linesmooth).  Thus	subpixel is typically set to TRUE while	smooth points
     or	smooth lines are being drawn.

     In	addition to its	effect on vertex position, subpixel also modifies the
     scan conversion of	lines.	Specifically, non-subpixel positioned lines
     are drawn closed, meaning that connected line segments both draw the
     pixel at their shared vertex, while subpixel positioned lines are drawn
     half open,	meaning	that connected lines segments share no pixels.
     (Smooth lines are always drawn half open, regardless of state of
     subpixel.)	 Thus subpixel positioned lines	produce	better results when
     logicop or	blendfunction are used,	but will produce different, possibly
     undesirable results in 2-D	applications where the endpoints of lines have
     been carefully placed.

     For example, using	the standard 2-D projection:

	  ortho2(left-0.5,right+0.5,bottom-0.5,top+0.5);
	  viewport(left,right,bottom,top);

     subpixel positioned lines match non-subpixel positioned lines pixel for
     pixel, except that	they omit either the right-most	or top-most pixel.
     Thus the non-subpixel positioned line drawn from (0,0) to (0,2) fills
     pixels (0,0), (0,1), and (0,2), while the subpixel	positioned line	drawn
     between the same coordinates fills	only pixels (0,0) and (0,1).

SEE ALSO    [Toc]    [Back]

      
      
     linesmooth, pntsmooth







									Page 1






subpixel(3G)							  subpixel(3G)



NOTES
     This routine does not function on IRIS-4D B or G models.

     The IRIS-4D GT and	GTX models do not implement subpixel positioned
     polygons.	They also do not implement subpixel positioned non-smooth
     lines.

     On	the Personal Iris, XS, XS24, XZ, Elan and Extreme, polygons are	always
     subpixel positioned, regardless of	the value of subpixel.	Subpixel
     positioned	non-smooth lines are not implemented.

     On	Indy, Iris Indigo Entry, and XL	systems, subpixel positioned nonsmooth
 lines are drawn closed instead of half-open.


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
endpolygon IRIX delimit the vertices of a polygon
bgnpolygon IRIX delimit the vertices of a polygon
endline IRIX delimit the vertices of a line
bgnline IRIX delimit the vertices of a line
bgnclosedline IRIX delimit the vertices of a closed line
endclosedline IRIX delimit the vertices of a closed line
pdr IRIX specifies the next point of a polygon
pmv IRIX specifies the first point of a polygon
lsbackup IRIX controls whether the ends of a line segment are colored
mapw IRIX maps a point on the screen into a line in 3-D world coordinates
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service