FLTK logo

[fltk.general] Re: [FLTK 1.3.5] Making a draggable item

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: [FLTK 1.3.5] Making a draggable item Manolo Sep 10, 2020  
  Use Fl_Window::shape(const Fl_Image*) to set the shape of your window.
If you use a PNG image, the doc of that function indicates:
"With an Fl_RGB_Image with an alpha channel (depths 2 or 4), the shaped window covers the image part that is not fully transparent."
Thus, fully transparent parts of the png will be out of the window's shape.
Please, notice that if you use FLTK 1.3.5 you'll have to set your ABI level to 1.3.3 or above.

Also, I would have put the creation of the shaped window when the donor widget receives the FL_DRAG
event rather than FL_PUSH.

Class Fl_Image_Surface can be useful to create the image of the shaped window because it can
produce an image from a widget and its visual display.


--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/b6abbe1a-8d76-446c-8949-b1d9d659ec55n%40googlegroups.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.