Re: Selections in plugins

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

 



On 1/26/06, Simon Budig <simon@xxxxxxxx> wrote:
Joël-Alexis Bialkiewicz (jabial@xxxxxxxxx) wrote:
>
> In fact I don't want to ignore selections but to use them in a different
> way. Especially, I would like to be able know, for a specific point, whether
> it is selected or not.

You can request the selection as a drawable using
gimp_image_get_selection(). You then can peek into this drawable to get
the selection value for a specific pixel. You probably need to be
careful with the offset handling a bit though.

1) What do you mean by careful with the offset handling?
2) When I read the data from the selection drawable, 1 means selected and 0 means not selected, isn't it?
3) When I call gimp_drawable_mask_bounds and there is a complex selection, what part of the image does it point out to me? Does it correspond the littlest square possible containing all selected points?
4) When I try to read a point that is not selected, will it give me the right value for this point or some dummy value?

Thanks in advance.

Sincerely,
Joel-Alexis Bialkiewicz
_______________________________________________
Gimp-developer mailing list
Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux