Re: [Gimp-developer] difference between canvas_draw and draw_tool_draw functions
Hi, [EMAIL PROTECTED] (Olivier) writes: > I don't think I can do that on my second day of gimp hacking indeed I would like to note that you have choosen the by far most tricky part of the GIMP source code to hack on. Even though we have already put some work into this, the tools code is still a mess and hardly anyone understands in full detail how this stuff is put together. The crop tool is even more evil since it has it's own dialog (or worse: an info dialog) and since it draws directly to the canvas. Just wanted to mention that so you don't get the impression that all of the GIMP code is in such a bad shape. Sven ___ Gimp-developer mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] difference between canvas_draw and draw_tool_draw functions
Hi, [EMAIL PROTECTED] (Olivier) writes: > not start as in code, but start as in functionality > we're talking about a feature request since 2002: > http://bugzilla.gnome.org/show_bug.cgi?id=93360 Oh, this request is much older. It's been in the early TODOs, so it's probably around for six or seven years. > some people indeed prefer darkened, but as long as nobody is working > on that, would black be useful instead of darkened? I do think > so. It is currently not about the choice between darkened and black, > but between nothing and black (unless somebody steps up to implement > 'darkened'). Well, I doubt that black is useful at all and it would certainly look ugly. But I have thought about it more and I think I see a way to implement darkening based on your approach of drawing the outside area in black. So your change would probably be a start regardless of what I said earlier. In order to undraw the black you've drawn on top of the image display, you will have to expose that area using gimp_display_shell_expose_area(). Sven ___ Gimp-developer mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] difference between canvas_draw and draw_tool_draw functions
On Thu, Sep 30, 2004 at 01:01:03PM +0200, Sven Neumann wrote: > Hi, > > [EMAIL PROTECTED] (Olivier) writes: > > > But black is a useful start, it can always be improved to a darkened > > image any later time. > > Well, a darkened image would need a completely different approach. true > I doubt that using black is a useful start not start as in code, but start as in functionality we're talking about a feature request since 2002: http://bugzilla.gnome.org/show_bug.cgi?id=93360 some people indeed prefer darkened, but as long as nobody is working on that, would black be useful instead of darkened? I do think so. It is currently not about the choice between darkened and black, but between nothing and black (unless somebody steps up to implement 'darkened'). > and I am not sure if we > should accept that change given that it goes into the wrong direction > implementation-wise. well, please let me know, because if it's not going to be included I better stop... regards, Olivier ___ Gimp-developer mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] difference between canvas_draw and draw_tool_draw functions
Hi, [EMAIL PROTECTED] (Olivier) writes: > But black is a useful start, it can always be improved to a darkened > image any later time. Well, a darkened image would need a completely different approach. I doubt that using black is a useful start and I am not sure if we should accept that change given that it goes into the wrong direction implementation-wise. Sven ___ Gimp-developer mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] difference between canvas_draw and draw_tool_draw functions
On Thu, Sep 30, 2004 at 12:46:02PM +0200, Sven Neumann wrote: > > the drawtool always paints using GIMP_CANVAS_STYLE_XOR, correct? I'm > > creating a patch to add an option to the crop tool to blind the > > region outside the crop area, so you can see how the image will look > > after cropping. I've not decided yet if XOR is good, or if the area > > should become black. Anybody a preference? > > I think neither XOR nor black are an option here. What we would want > to see is a less saturated and darkened version of the image being > shown outside the crop region. That is not going to be a trivial > change though. less saturated won't work for grayscale images, but darkened would be OK I think, but I don't think I can do that on my second day of gimp hacking indeed ;-) But black is a useful start, it can always be improved to a darkened image any later time (for now you can always toggle the checkbox if you want to see what the outer region of the image looks like). regards, Olivier ___ Gimp-developer mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] difference between canvas_draw and draw_tool_draw functions
Hi, [EMAIL PROTECTED] (Olivier) writes: > On Thu, Sep 30, 2004 at 11:27:17AM +0200, Sven Neumann wrote: > >> > what is the difference between for example >> > gimp_canvas_draw_rectangle and gimp_draw_tool_draw_rectangle? >> >> The GimpDrawTool API takes image coordinates while the (lowerlevel) >> GimpCanvas API takes display coordinates. > > the drawtool always paints using GIMP_CANVAS_STYLE_XOR, correct? I'm > creating a patch to add an option to the crop tool to blind the > region outside the crop area, so you can see how the image will look > after cropping. I've not decided yet if XOR is good, or if the area > should become black. Anybody a preference? I think neither XOR nor black are an option here. What we would want to see is a less saturated and darkened version of the image being shown outside the crop region. That is not going to be a trivial change though. Sven ___ Gimp-developer mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] difference between canvas_draw and draw_tool_draw functions
On Thu, Sep 30, 2004 at 11:27:17AM +0200, Sven Neumann wrote: > > what is the difference between for example > > gimp_canvas_draw_rectangle and gimp_draw_tool_draw_rectangle? > > The GimpDrawTool API takes image coordinates while the (lowerlevel) > GimpCanvas API takes display coordinates. the drawtool always paints using GIMP_CANVAS_STYLE_XOR, correct? I'm creating a patch to add an option to the crop tool to blind the region outside the crop area, so you can see how the image will look after cropping. I've not decided yet if XOR is good, or if the area should become black. Anybody a preference? another question, how can I 'undraw' a section, after the user for example changed the location of a handle? If I use XOR this is not a problem, but if I draw the area black, this is a problem. thanks, Olivier ___ Gimp-developer mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] difference between canvas_draw and draw_tool_draw functions
Hi, [EMAIL PROTECTED] (Olivier) writes: > what is the difference between for example > gimp_canvas_draw_rectangle and gimp_draw_tool_draw_rectangle? The GimpDrawTool API takes image coordinates while the (lowerlevel) GimpCanvas API takes display coordinates. > when should one use which function? Whenever possible the tools should draw using the GimpDrawTool API and only GimpDrawTool should use the GimpCanvas API. Sven ___ Gimp-developer mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer