CompuServe Thread

Anyone seen a B-Spline?

4 messages in this thread
#28596From: Art SteinmetzJan 3, 1989 1:37 PM
In a related matter has anyone seen some sample code which lays out a rectangle ala DPaint's rectangle tool? — Art
#28644From: John DraperJan 3, 1989 8:33 PM
Art, I did a thing to draw a rectangle in ABasic back in '85. The algorithm is fairly simple. Get your x and y starting point, and the x and y ending points, and draw the four lines. Assume x1, y1 are start values for x and y, and x2,y2 are end values: Draw x1,y1 to x2,y1 Draw x2,y1 to x2,y2 Draw x2,y2 to x1,y2 Draw x1,y2 to x1,y1 If you have to do a Move to position the cursor, you might be better off drawing the two lines from x1,y1, then the two lines from x2,y2. -larry
#28771From: Art SteinmetzJan 4, 1989 9:20 AM
Thank you very much, Larry, but that much I can do. I was speaking about code to do what happens between the time you select the DPaint rectangle tool and the time DPaint finally draws the rectangle. You know, reading the mouse up/down buttons and dynamically XORing a rectangle whose corner follows the mouse. I've done exactly that in Turbo Pascal using cursor keys but I've found the Amiga way (monitoring mouse moves, setting draw modes, etc) is more involved. I'd just as soon not reinvent the wheel. Thanks. — Art
#28902From: John DraperJan 5, 1989 12:10 AM
Art, Ok… didn't knwo what level you wanted. I'll keep my eyes open for an example program. I know I have one in assembler somewhere, but not sure about having it in other languages. -larry