RSS/Atom feed Twitter
Site is read-only, email is disabled

previewarea and drawablepreview

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

7 of 7 messages available
Toggle history

Please log in to manage your subscriptions.

previewarea and drawablepreview geert jordaens 14 Sep 19:42
  previewarea and drawablepreview David Odin 14 Sep 21:02
   previewarea and drawablepreview geert jordaens 14 Sep 22:23
    previewarea and drawablepreview David Odin 14 Sep 22:58
     previewarea and drawablepreview geert jordaens 14 Sep 23:28
  previewarea and drawablepreview Sven Neumann 15 Sep 12:29
   previewarea and drawablepreview Nathan Summers 15 Sep 19:29
geert jordaens
2004-09-14 19:42:18 UTC (over 19 years ago)

previewarea and drawablepreview

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.

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

Geert

David Odin
2004-09-14 21:02:04 UTC (over 19 years ago)

previewarea and drawablepreview

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

geert jordaens
2004-09-14 22:23:10 UTC (over 19 years ago)

previewarea and drawablepreview

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

David Odin
2004-09-14 22:58:22 UTC (over 19 years ago)

previewarea and drawablepreview

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

geert jordaens
2004-09-14 23:28:34 UTC (over 19 years ago)

previewarea and drawablepreview

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.

Sven Neumann
2004-09-15 12:29:43 UTC (over 19 years ago)

previewarea and drawablepreview

Hi,

geert jordaens 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

Nathan Summers
2004-09-15 19:29:23 UTC (over 19 years ago)

previewarea and drawablepreview

On 15 Sep 2004 12:29:43 +0200, Sven Neumann wrote:

geert jordaens 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