Remove colour attributes from body and strip most of the font tags out
This commit is contained in:
parent
7e957c0bb4
commit
c1f88ddb41
362 changed files with 1632 additions and 1706 deletions
10
38-02.html
10
38-02.html
|
|
@ -24,7 +24,7 @@
|
|||
<!--CHAPTER=38//-->
|
||||
<!--PAGES=712-717//-->
|
||||
<!--UNASSIGNED1//-->
|
||||
<!--UNASSIGNED2//--></HEAD><BODY LINK=#0000FF ALINK=#000099 VLINK=#0000FF BGCOLOR=#FFFFFF>
|
||||
<!--UNASSIGNED2//--></HEAD><body>
|
||||
|
||||
<CENTER>
|
||||
<TABLE BORDER>
|
||||
|
|
@ -36,12 +36,12 @@
|
|||
</TABLE>
|
||||
</CENTER>
|
||||
<P><BR></P>
|
||||
<H4 ALIGN="LEFT"><A NAME="Heading5"></A><FONT COLOR="#000077">How Do You Fit Polygons Together?</FONT></H4>
|
||||
<H4 ALIGN="LEFT"><A NAME="Heading5"></A>How Do You Fit Polygons Together?</H4>
|
||||
<P>How, then, do you fit polygons together? <I>Very</I> carefully. First, the line-tracing algorithm must be adjusted so that it selects only those pixels that are truly inside the polygon. This basically requires shifting a standard line-drawing algorithm horizontally by one half-pixel toward the polygon’s interior. That leaves the issue of how to handle points that are exactly on the boundary, and points that lie at vertices, so that those points are drawn once and only once. To deal with that, we’re going to adopt the following rules:</P>
|
||||
<ul>
|
||||
<li>
|
||||
Points located exactly on nonhorizontal edges are drawn only if the interior of the polygon is directly to the right (left edges are drawn, right edges aren’t).
|
||||
<P><A NAME="Fig3"><IMG SRC="images/38-03.jpg"><BR><FONT COLOR="#000077"><B>Figure 38.3</B></FONT></A> <I>The adjacent polygons problem.</I></P>
|
||||
<P><A NAME="Fig3"><IMG SRC="images/38-03.jpg"><BR><B>Figure 38.3</B></A> <I>The adjacent polygons problem.</I></P>
|
||||
</li>
|
||||
<li>Points located exactly on horizontal edges are drawn only if the interior of the polygon is directly below them (horizontal top edges are drawn, horizontal bottom edges aren’t).
|
||||
<li>A vertex is drawn only if all lines ending at that point meet the above conditions (no right or bottom edges end at that point).
|
||||
|
|
@ -53,7 +53,7 @@
|
|||
</TABLE>
|
||||
<P>For our purposes, nonoverlapping polygons are the way to go, so let’s have at them.
|
||||
</P>
|
||||
<H3><A NAME="Heading6"></A><FONT COLOR="#000077">Filling Non-Overlapping Convex Polygons</FONT></H3>
|
||||
<H3><A NAME="Heading6"></A>Filling Non-Overlapping Convex Polygons</H3>
|
||||
<P>Without further ado, Listing 38.1 contains a function, <B>FillConvexPolygon</B>, that accepts a list of points that describe a convex polygon, with the last point assumed to connect to the first, and scans it into a list of lines to fill, then passes that list to the function <B>DrawHorizontalLineList</B> in Listing 38.2. Listing 38.3 is a sample program that calls <B>FillConvexPolygon</B> to draw polygons of various sorts, and Listing 38.4 is a header file included by the other listings. Here are the listings; we’ll pick up discussion on the other side.</P>
|
||||
<P><B>LISTING 38.1 L38-1.C</B></P>
|
||||
<!-- CODE //-->
|
||||
|
|
@ -330,7 +330,7 @@
|
|||
|
||||
<hr width="90%" size="1" noshade>
|
||||
<div align="center">
|
||||
<font face="Verdana,sans-serif" size="1">Graphics Programming Black Book © 2001 Michael Abrash</font>
|
||||
Graphics Programming Black Book © 2001 Michael Abrash
|
||||
</div>
|
||||
<!-- all of the reference materials (books) have the footer and subfoot reveresed -->
|
||||
<!-- reference_subfoot = footer -->
|
||||
|
|
|
|||
Loading…
Reference in a new issue