12.07.2015 Views

williams-et-al-1983-apple-ii-computer-graphics

williams-et-al-1983-apple-ii-computer-graphics

williams-et-al-1983-apple-ii-computer-graphics

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

116 APPLE II COMPUTER GRAPHICScolored background mangled. You could erase it using the color of thefield, but that wou ld mess up the black section of the background. TheXDRAW command eliminates that problem. With Listing 1©-5 in memory,type171819 PRINT CLR$ (Cl)21 NEXT Cl3948 XDRAW 1 AT X ,YRun the modified program and notice the differences. Line 48© changesthe DRAW to XDRAW-, and the other statements eliminate C2 which representsthe color in which the <strong>apple</strong> was DRAWn. Where DRAW attempts toplot the <strong>apple</strong> in the specified color, XDRAW ignores HCOLOR and plotsthe shapes in colors which depend entirely on the background. XDRAWautomatic<strong>al</strong>ly plots the shape in the complement of the background color.Black and white are complements, as are blue and green, orange andviol<strong>et</strong>. XDRAWing on the green field will give you a blue <strong>apple</strong>, and anyportion which overlaps into the black will be white. The usefu l aspect ofXDRAW is that when it XDRAWs the figure the second time, it erasescleanly and compl<strong>et</strong>ely, regard less of the background. This attribute is veryhandy when animating-a subject we will cover in later chapters.RecappingWe have shown you how to design and digitize shapes, and at the sam<strong>et</strong>ime we have hopefu lly shown you the v<strong>al</strong>ue of a good Hi-Res editor. Ifyou are planning to do any serious work in Hi-Res, an editor is a necessarytool. We have <strong>al</strong>so demonstrated how to use BSAVE or the Monitor "W"to save the table, and BLOAD or SHLOAD to recover it. You have <strong>al</strong>sobeen introduced to the commands used to plot, rotate, and sc<strong>al</strong>e theshape. The initi<strong>al</strong> work involved with shapes is wearisome and frustrating,but when the shape is done it is a simple y<strong>et</strong> powerfu l element of yourprogramming arsen<strong>al</strong>.VocabularyDigitizeDRAWOffs<strong>et</strong>Point of OriginROTSCALEShapeShape TableSH LOADVectorVector DiagramXDRAW

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!