Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!seismo!rutgers!cbmvax!carolyn
From: carolyn@cbmvax.cbm.UUCP (Carolyn Scheppner)
Newsgroups: comp.sys.amiga
Subject: Re: I need help with proportional gadgets!
Message-ID: <1142@cbmvax.cbmvax.cbm.UUCP>
Date: Thu, 18-Dec-86 11:34:27 EST
Article-I.D.: cbmvax.1142
Posted: Thu Dec 18 11:34:27 1986
Date-Received: Fri, 19-Dec-86 07:01:53 EST
References: <1216@navajo.STANFORD.EDU>
Reply-To: carolyn@cbmvax.UUCP (Carolyn Scheppner)
Distribution: na
Organization: Commodore Technology, West Chester, PA
Lines: 62

In article <1216@navajo.STANFORD.EDU> ali@navajo.ARPA (Ali Ozer) writes:
>[=====:-(===========]   
>
>Ok... Here's a question about proportional gadgets. ...
>... The problem is, the select box of the gadget is not the same as
>my background color. Also, when I select the knob, the knob is complemented,
>although I am specifying no highlighting. Furthermore, as I move the
>gadget around slowly, it erases the background color. But, if I move
>it quickly, it erases it, but not perfectly --- It leaves patches of
>it behind. 
>
>-------
>/* I don't initialize this image --- The Intuition Manual says "don't
>   initialize it when using AutoKnob." I wonder why we even need it?  */
>static struct Image InvPropImage;
>/* I initialize this PropInfo during runtime, in InitGadgets() */
>static struct PropInfo InvBoxPInfo;
>
>static struct Gadget InvBoxGadget = {
>  NULL /* No next */,
>  (SHORT)X1, (SHORT)Y1, (SHORT)INVBOXWIDTH, (SHORT)INVBOXHEIGHT,
>  GADGHNONE | GADGDISABLED, RELVERIFY,
>  PROPGADGET, (APTR)(&InvPropImage), 
>  NULL, NULL, NULL, (APTR)(&InvBoxPInfo), INVBOXID, NULL};

Intuition manual says GADGIMAGE Flag should be set if GadgetRender 
 points to an Image structure.
Also, I use GADGIMMEDIATE|RELVERIFY for Activation.

>InitGadgets ()
>{
>  InvBoxPInfo.Flags = (AUTOKNOB | FREEVERT | PROPBORDERLESS); 
>  InvBoxPInfo.VertBody = 0x1000;         
>  InvBoxPInfo.HorizBody = 0xffff;       
>  AddGadget (win, &InvBoxGadget, -1L);   /* win is my window */
>  OnGadget (&InvBoxGadget, win, NULL);     
>}

I don't understand why you are not using NULL for HorizBody.  Your
  knob only moves vertically.

This may clear up the incomplete erasing.  The unwanted complementing
of the knob seems to be a built-in "feature" of AUTOKNOBs.  The only
way I know to stop it is to NOT use AUTOKNOB.  Supply your own
Image for the knob.  You may be able to get away with an Image with
NO ImageData like those commonly used for the color chip gadgets in
color palettes.  This would save you from having to make sure the
ImageData is in CHIP memory.  The Image structure for a color chip
type gadget often specifies only Width, Height, Depth, and PlaneOnOff.
The Width and Height describe the rectangle to be rendered, the 
PlaneOnOff describes which planes of that rectangle should be filled
with 1's.  I haven't figured out how Graphicraft gets props with bg
color in the container.  They use dummy (NULL-filled) Image structures
and their flags are GADGHCOMP|GADGIMAGE.

carolyn
-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Carolyn Scheppner -- CBM   >>Amiga Technical Support<<
                     UUCP  ...{allegra,caip,ihnp4,seismo}!cbmvax!carolyn 
                     PHONE 215-431-9180
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=