Mask Problems



I apologize if this shows up twice; I tried posting once when I wasn't
subscribed.

I don't seem to be getting a correct mask back from my pixmap creation
calls; trying to use the mask has no effect, but trying to use a manually
generated mask does.  I want the white pixels in the xpm to be 
transparent.  Relevant code follows:

  GdkBitmap *mask=NULL;

  /* the window widget has already been shown at this point. */
  gc = gdk_gc_new(window->window);
  noteheadPM = gdk_pixmap_create_from_xpm_d (window->window, &mask,
                                             &(window->style->white),
                                             notehead3_xpm);
  gdk_gc_set_clip_mask(gc,mask);
  gdk_gc_set_clip_origin(gc, 10, 10);
  gdk_draw_rectangle(drawingarea->window, gc, TRUE, 0, 0, 640, 480);

This results in a square of the right size appearing in the upper left
corner of the window; I should be getting an angled ellipse.  Can anyone
tell me what I'm doing wrong?

TIA.

-- 
Brian

                                            "We are each of us angels with
Email: bhv1 psu edu                          only one wing, and we can fly
Web:   http://www.personal.psu.edu/bhv1/     only by embracing each other."
                                                     -- Lucian de Crescenzo




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]