Re: [Gimp-developer] previewarea and drawablepreview

2004-09-15 Thread Nathan Summers
On 15 Sep 2004 12:29:43 +0200, Sven Neumann <[EMAIL PROTECTED]> wrote:
> geert jordaens <[EMAIL PROTECTED]> writes:
> The popup menu API is likely going to change before 2.2.
> GimpPreviewArea shouldn't provide a full menu, it should only add the
> checkerboard related submenus. That way our widgets could add other
> things to this menu. GimpPreview should for example add a toggle menu
> item for the "Update Preview". I just haven't settled on an API here
> but gimp_preview_area_menu_popup() is not likely going to stay.

GtkUIManager's merging functions seem appropriate here.

> I would really like to see a
> preview widget being added that deals with previewing the effect on a
> scaled-down version of the drawable. That widget would show the full
> drawable and wouldn't need any scrollbars and such. Still looking for
> a good name for this beast...

Off the top of my head:

GimpScalablePreview
GimpScaledPreview
GimpScalePreview
GimpScaledDrawablePreview

Rockwalrus
___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


Re: [Gimp-developer] previewarea and drawablepreview

2004-09-15 Thread Sven Neumann
Hi,

geert jordaens <[EMAIL PROTECTED]> writes:

> I'm trying to catch up with the changes concerning the preview widget
> Could somebody explain me why the functions
> 
> gimp_preview_area_menu_popup
> gimp_preview_area_menu_new
> gimp_preview_area_menu_toggled are located in gimppreviewarea this way
> the preview area is not a basic replacement for the gtk_preview
> widget. If i understand the function of gimp_drawable_preview then I
> would place forementioned functions there.

These functions are not really part of the GimpPreviewArea widget. If
you use a GimpPreviewArea directly, you will never see a popup menu.
The only purpose of gimp_preview_area_menu_popup() is to make it
easier for higher-level widgets like GimpPreview to implement
GtkWidget::popup_menu(). The popup menu belongs to the higher-level
widget, it is only provided by GimpPreviewArea for convenience.

The popup menu API is likely going to change before 2.2.
GimpPreviewArea shouldn't provide a full menu, it should only add the
checkerboard related submenus. That way our widgets could add other
things to this menu. GimpPreview should for example add a toggle menu
item for the "Update Preview". I just haven't settled on an API here
but gimp_preview_area_menu_popup() is not likely going to stay.

Let me try to summarize the purpose of GimpPreviewArea. It is an area
you can draw to and it knows how to handle the various types of image
data that we deal with in GIMP (RGB, RGBA, GRAY, GRAYA, INDEXED,
INDEXEDA). GimpPreviewArea visualizes the alpha channel by compositing
the buffer on a checker-board. The checkerboard is configurable vie
object properties of the preview area. For convenience you can ask the
preview area to create a popup menu that is readily connected to the
checkerboard properties.

GimpPreviewArea can be used as a drop-in replacement for
GtkPreview. Like GtkPreview it keeps an internal buffer of the image
data you have drawn to it. This allows it to handle expose events for
you. It also provides an API that is very similar to GtkPreview.
Calls to gtk_preview_draw_row() can be replaced by calls to
gimp_preview_area_draw() passing a height of 1.

As you can see, GimpPreviewArea is still pretty much low-level. This
is intentional. Ideally we would provide more higher-level widgets and
noone would have to deal with GimpPreviewArea directly. At the moment
we only have GimpDrawablePreview which works nicely for a lot of
plug-in previews but not for all of them. For the plug-ins were
GimpDrawablePreview doesn't suit, you will have to use GimpPreviewArea
directly for now. It would be nice to hear though what other widgets
beside GimpDrawablePreview are needed. I would really like to see a
preview widget being added that deals with previewing the effect on a
scaled-down version of the drawable. That widget would show the full
drawable and wouldn't need any scrollbars and such. Still looking for
a good name for this beast...



Sven
___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


Re: [Gimp-developer] previewarea and drawablepreview

2004-09-14 Thread geert jordaens
David Odin wrote:
On Tue, Sep 14, 2004 at 10:23:10PM +0200, geert jordaens wrote:
 

why not just using GimpPreviewArea in a frame? :
Well applying a plugin on a 3000*2000 pixel image could take a lot of time. 
Making the preview scrollable and applying the effect on the "viewable" 
part solves most of the time the performance issues. (and in general i am 
very happy with that)
   

 This is the current situation with GimpDrawablePreview.
 

However when applying a effect that should give a general enhancement of 
the whole image (like color enhancement) it would be nice to have a larger 
scrollable previewarea working on a scaled down version eg. 600*400.

   

 This would be another widget, with zooming facilities. This is planed
by Sven and me, but we need to solve some problem in the core before
this would happen. In the meantime, you can put a thumbnail in a
GimpPreviewArea and resize the area (and such the thumbnail) when the
user resize the dialog.
  Regards,
  DindinX
 

 

for now I'll settle for the previewarea & the frame.
___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


Re: [Gimp-developer] previewarea and drawablepreview

2004-09-14 Thread David Odin
On Tue, Sep 14, 2004 at 10:23:10PM +0200, geert jordaens wrote:
> 
> why not just using GimpPreviewArea in a frame? :
> Well applying a plugin on a 3000*2000 pixel image could take a lot of time. 
> Making the preview scrollable and applying the effect on the "viewable" 
> part solves most of the time the performance issues. (and in general i am 
> very happy with that)

  This is the current situation with GimpDrawablePreview.

> However when applying a effect that should give a general enhancement of 
> the whole image (like color enhancement) it would be nice to have a larger 
> scrollable previewarea working on a scaled down version eg. 600*400.
> 
  This would be another widget, with zooming facilities. This is planed
by Sven and me, but we need to solve some problem in the core before
this would happen. In the meantime, you can put a thumbnail in a
GimpPreviewArea and resize the area (and such the thumbnail) when the
user resize the dialog.

   Regards,

   DindinX
  

-- 
[EMAIL PROTECTED]
Why do the signs that say "Slow Children" have a picture of a running child?
___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


Re: [Gimp-developer] previewarea and drawablepreview

2004-09-14 Thread geert jordaens




David Odin wrote:

  On Tue, Sep 14, 2004 at 07:42:18PM +0200, geert jordaens wrote:
  
  
hello,

I'm trying to catch up with the changes concerning the preview widget 
Could somebody explain me why the functions

gimp_preview_area_menu_popup
gimp_preview_area_menu_new
gimp_preview_area_menu_toggled 

are located in gimppreviewarea this way the preview area is not a basic 
replacement for the gtk_preview widget. If i understand the function of 
gimp_drawable_preview then I would place forementioned functions there.


  
Certainly not. The menu is for changing the checker aspect. It is in
no way related to a particular drawable.

  
  
I would like to use the gimp_drawable_preview for a plugin on a scaled down 
version of the drawable (let's say thumbnail). 

  
  
  You'll have to create a new widget derived from GimpPreview to do
this, then. But then, why not just using GimpPreviewArea in a frame?

Regards,

 DindinX

  


why not just using GimpPreviewArea in a frame? :
Well applying a plugin on a 3000*2000 pixel image could take a lot of time. 
Making the preview scrollable and applying the effect on the "viewable" part 
solves most of the time the performance issues. (and in general i am very happy with that)
However when applying a effect that should give a general enhancement of the whole image 
(like color enhancement) it would be nice to have a larger scrollable previewarea 
working on a scaled down version eg. 600*400.

greetings,

Geert





Re: [Gimp-developer] previewarea and drawablepreview

2004-09-14 Thread David Odin
On Tue, Sep 14, 2004 at 07:42:18PM +0200, geert jordaens wrote:
> hello,
> 
> I'm trying to catch up with the changes concerning the preview widget 
> Could somebody explain me why the functions
> 
> gimp_preview_area_menu_popup
> gimp_preview_area_menu_new
> gimp_preview_area_menu_toggled 
> 
> are located in gimppreviewarea this way the preview area is not a basic 
> replacement for the gtk_preview widget. If i understand the function of 
> gimp_drawable_preview then I would place forementioned functions there.
>
  Certainly not. The menu is for changing the checker aspect. It is in
no way related to a particular drawable.

> I would like to use the gimp_drawable_preview for a plugin on a scaled down 
> version of the drawable (let's say thumbnail). 

  You'll have to create a new widget derived from GimpPreview to do
this, then. But then, why not just using GimpPreviewArea in a frame?

Regards,

 DindinX

-- 
[EMAIL PROTECTED]
/D{def}def 306 108 translate 57.6 dup scale 1 setlinecap 0.005 setlinewidth
0 0 15 {/r rand 100 mod D r 1 lt {/m[0 0 0 0.16 0 0]D}{r 86 lt{/m[0.85
-0.04 0.04 0.85 0 1.6]D}{r 93 lt{/m[0.2 0.23 -0.26 0.22 0 1.6]D}{/m[-0.15
0.26 0.28 0.24 0 0.44]D}ifelse}ifelse}ifelse m transform 2 copy moveto 0.001
dup rlineto stroke}repeat showpage %(c)DindinX
___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer