hsgj@batcomputer.tn.cornell.edu (Dan Green) (09/15/87)
I finally decided to do some graphics-type programming on my Amiga, and I have run into a little difficulty. I can't seem to find the Kernel Graphics function 'SetDrPt'. This function is suppossed to set the line drawing pattern, so you can draw dotted or dashed (or solid) lines. When I use this function in a program and link with amiga.lib (Kickstart 1.2G) the linker can't find the function in the library. Either: a) I am terribly confused. b) The function has a new name from what it was called in the RKM. c) The function was never implemented, or was removed by C/A. Can anyone enlighten me as to which of these is true? As an aside, the thing I am working on is a 'rubberbanding' type rectangular select box. I wanted it to have dashed lines, but now have to settle for solid ones. One thing I discovered is that if you have to move endpoints around a lot (I do because the user keeps dragging my box all over the place), then the Draw() function is actually faster then the PolyDraw() function, because you don't waste time recomputing the line array for polydraw. The time difference is pretty minimal (about 24 ticks / 1000 redraws of a 50x50x2 dot box). It is a shame there is no RKM function equivalent to PolyDraw but where the endpoints were a relative x,y distance from each other. The current polydraw requires absolute endpoints. PS: On another topic, I whipped up a 'whereis' routine, but it takes 33 seconds to scan through the original WorkBench 1.2 disk (that came with the gamma release) to hunt for a non-existant file. Is anyone interested in this utility -- or more importantly, has anyone whipped up a faster one? On this topic, please reply via email. Thanks, -- Dan Green -- ARPA: hsgj@tcgould.tn.cornell.edu UUCP: ihnp4!cornell!batcomputer!hsgj BITNET: hsgj@cornella
louie@trantor.umd.edu (Louis A. Mamakos) (09/15/87)
SetDrPt is a macro, defined in graphics/gfxmacros.h . Clever, huh? Louis A. Mamakos WA3YMH Internet: louie@TRANTOR.UMD.EDU University of Maryland, Computer Science Center - Systems Programming
andy@cbmvax.UUCP (Andy Finkel) (09/15/87)
In article <2334@batcomputer.tn.cornell.edu> hsgj@batcomputer.tn.cornell.edu (Dan Green) writes: > >I finally decided to do some graphics-type programming on my Amiga, >and I have run into a little difficulty. I can't seem to find the >Kernel Graphics function 'SetDrPt'. SetDrPt is a macro, found in the file gfxmacros.h. (its defined as {(w)->LinePtrn = p;(w)->Flags |= FRST_DOT;(w)->linpatcnt=15;} but it would be a good thing if you just included gfxmacros.h, rather than just define it in your code. When you include gfxmacros.h you also pick up our friends SetOPen, SetWrMsk, and SetAfPt) >This function is suppossed to >set the line drawing pattern, so you can draw dotted or dashed (or >solid) lines. When I use this function in a program and link with >amiga.lib (Kickstart 1.2G) the linker can't find the function in >the library. I'd upgrade to release V1.2 if I were you. While the changes between Gamma-1 and release were not great, there were changes. one of which might bite you someday :-( -- andy finkel {ihnp4|seismo|allegra}!cbmvax!andy Commodore-Amiga, Inc. "Interfere? Of course we'll interfere. Always do what you're best at, I always say." Any expressed opinions are mine; but feel free to share. I disclaim all responsibilities, all shapes, all sizes, all colors.
scott@applix.UUCP (Scott Evernden) (09/15/87)
In article <2334@batcomputer.tn.cornell.edu> hsgj@batcomputer.tn.cornell.edu (Dan Green) writes: > > . . . . When I use [ SetDrPt() ] in a program and link with >amiga.lib (Kickstart 1.2G) the linker can't find the function . .. SetDrPt() is a macro; look in "gfxmacros.h", or maybe "rastport.h" ? Somewhere in includes/graphics/ -scott
ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) (09/15/87)
In article <2334@batcomputer.tn.cornell.edu> hsgj@batcomputer.tn.cornell.edu (Dan Green) writes: > >I finally decided to do some graphics-type programming on my Amiga, >and I have run into a little difficulty. I can't seem to find the >Kernel Graphics function 'SetDrPt'. [ ... ] Either: > a) I am terribly confused. > b) The function has a new name from what it was called in > the RKM. > c) The function was never implemented, or was removed by C/A. >Can anyone enlighten me as to which of these is true? > d) It is not a function; it is a #defined macro. Go to the top of your source code and include the line: #include <graphics/gfxmacros.h> You might want to briefly inspect this file, as there are a number of macros in this file which might otherwise be mistaken for functions. And now a question to the wizards at C-A (this means you, Dale!): Whyzzit that SetDrPt(), SetOPen() et al are macros, but SetAPen() and SetBPen() are real library calls? Further, when I tried turning SetAPen() into a macro many moons ago as an experiment, things broke left and right. What exactly does SetAPen() do that prevents its existence as a macro? _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ Leo L. Schwab -- The Guy in The Cape ihnp4!ptsfa -\ \_ -_ Bike shrunk by popular demand, dual ---> !{well,unicom}!ewhac O----^o But it's still the only way to fly. hplabs / (pronounced "AE-wack") "Work FOR? I don't work FOR anybody! I'm just having fun." -- The Doctor
jesup@mizar.steinmetz (Randell Jesup) (09/16/87)
hsgj@batcomputer.tn.cornell.edu (Dan Green) writes: >I can't seem to find the >Kernel Graphics function 'SetDrPt'. This function is suppossed to >set the line drawing pattern, so you can draw dotted or dashed (or >solid) lines. When I use this function in a program and link with >amiga.lib (Kickstart 1.2G) the linker can't find the function in >the library. SetDrPt is available in <graphics/gfxmacros.h>. It is merely a macro to update the pattern variable in the RastPort structure. Lots of graphics functions are actually macros to twiddle things. -- Randell Jesup (Please use one of these paths for mail) mizar!jesup@steinmetz.UUCP (uunet!steinmetz!{mizar|crd}!jesup) jesup@ge-crd.ARPA
lai@topo.UUCP (09/17/87)
In article <2334@batcomputer.tn.cornell.edu> hsgj@batcomputer.tn.cornell.edu (Dan Green) writes: > >... I can't seem to find the >Kernel Graphics function 'SetDrPt'. This function is suppossed to > The function SetDrPt is actually a macro: SetDrPt(w,p): {(w)->LinePtrn=p; (w)->Flags|=FRST_DOT;(w)->linpatcnt=15;} and is defined in graphics/gfxmacros.h at line 29 [can i put in a plug for my book? The Developers Reference Guide, which gives this reference. $14.95 at your dealer or e-mail me. ] >-- Dan Green >ARPA: hsgj@tcgould.tn.cornell.edu >UUCP: ihnp4!cornell!batcomputer!hsgj BITNET: hsgj@cornella -- The above views are products of my sick mind, and not of GenRad's.