Re: [Gimp-developer] about gimp zoom preview new

2007-03-13 Thread Sven Neumann
Hi,

On Tue, 2007-03-13 at 21:21 -0300, Luis A. Florit wrote:

> And all of them implemented it with complicated code. No easy command.
> So, by your answer I understand that there is no
> 'gimp_zoom_preview_draw_region' equivalent (I wonder why...).

The point of using a zoomed out preview is that the effect can be
applied on the zoomed out view. Otherwise it would be unreasonably slow.
So there's no equivalent of draw_region() because you aren't working
directly with pixel regions here. You are usually using the
gimp_drawable_get_sub_thumbnail() function to retrieve a scaled view of
the pixel data and then apply your effect on these preview pixels.


Sven



___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] about gimp zoom preview new

2007-03-13 Thread Luis A. Florit
* El 13/03/07 a las  8:29, Sven Neumann chamullaba:

> On Mon, 2007-03-12 at 23:13 -0300, Luis A. Florit wrote:
>
> > However, I am getting many errors. One of them is due to the
> > fact that I don't know how to retrieve the origin of the preview.
> > For non-zoom previews, the funcion 'gimp_preview_get_position'
> > gives you the origin. I wasn't able to find the correspoding one
> > for zoom_preview (gimp_zoom_preview_get_position does not exist?!).
>
> GimpZoomPreview is derived from GimpPreview so you can use all
> methods from GimpPreview.

Oops...

> > Another one is that I don't know which is the equivalent to
> > 'gimp_drawable_preview_draw_region' for zoom_preview.
>
> Perhaps have a look at one of the many plug-ins in the source
> distribution that use a GimpZoomPreview...

I did it already.
And all of them implemented it with complicated code. No easy command.
So, by your answer I understand that there is no
'gimp_zoom_preview_draw_region' equivalent (I wonder why...).
I will try to understand what those codes do and implement then one.

Thanks,

Luis.

___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] about gimp zoom preview new

2007-03-12 Thread Sven Neumann
Hi,

On Mon, 2007-03-12 at 23:13 -0300, Luis A. Florit wrote:

> However, I am getting many errors. One of them is due to the
> fact that I don't know how to retrieve the origin of the preview.
> For non-zoom previews, the funcion 'gimp_preview_get_position'
> gives you the origin. I wasn't able to find the correspoding one
> for zoom_preview (gimp_zoom_preview_get_position does not exist?!).

GimpZoomPreview is derived from GimpPreview so you can use all methods
from GimpPreview.

> Another one is that I don't know which is the equivalent to
> 'gimp_drawable_preview_draw_region' for zoom_preview.

Perhaps have a look at one of the many plug-ins in the source
distribution that use a GimpZoomPreview...


Sven


___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] about gimp zoom preview new

2007-03-12 Thread Sven Neumann
Hi,

On Mon, 2007-03-12 at 19:36 -0300, Luis A. Florit wrote:

> I am doing something wrong... I tried with this command:
> 
> export PKG_CONFIG_PATH=/opt/gimp/lib/pkgconfig ; /opt/gimp/bin/gimp-2.3
> 
> and I still having the same error.

Are you actually using the LD_LIBRARY_PATH environment variables as
explained in the release notes for the development version?


Sven


___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] about gimp zoom preview new

2007-03-12 Thread Luis A. Florit
Hi Ori,

* El 12/03/07 a las 19:55, Ori Bernstein chamullaba:

> On Mon, 12 Mar 2007 19:36:42 -0300, "Luis A. Florit"
> <[EMAIL PROTECTED]> said:
>
> > I am doing something wrong... I tried with this command:
>
> Yes, yes you are.
>
> > export PKG_CONFIG_PATH=/opt/gimp/lib/pkgconfig ; /opt/gimp/bin/gimp-2.3
> >
> > and I still having the same error.
>
> PKG_CONFIG_PATH only affects where stuff looks as it gets compiled. Also, 
> you'd
> want to use PKG_CONFIG_PATH=/opt/gimp/lib/pkgconfig:$PKG_CONFIG_PATH, to keep
> the old stuff in there (assuming it's non-empty).
>
> IIRC, you'd want to set $LD_LIBRARY_PATH=/opt/gimp/lib/ for runtime.

Interesting.
In fact, I didn't recompile GIMP, I only did a

export LD_LIBRARY_PATH=/opt/gimp/lib:$LD_LIBRARY_PATH

and the zoom preview worked! :)

However, I am getting many errors. One of them is due to the
fact that I don't know how to retrieve the origin of the preview.
For non-zoom previews, the funcion 'gimp_preview_get_position'
gives you the origin. I wasn't able to find the correspoding one
for zoom_preview (gimp_zoom_preview_get_position does not exist?!).
Another one is that I don't know which is the equivalent to
'gimp_drawable_preview_draw_region' for zoom_preview.

Thanks for the help, and the prompt answers!!!

Luis.
___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] about gimp zoom preview new

2007-03-12 Thread Luis A. Florit
gg,

I didn't get your joke at a first sight.
English is not my language...

BTW, it was funny. :)

L.

___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] about gimp zoom preview new

2007-03-12 Thread Ori Bernstein
On Mon, 12 Mar 2007 19:36:42 -0300, "Luis A. Florit"
<[EMAIL PROTECTED]> said:

> I am doing something wrong... I tried with this command:

Yes, yes you are.

> export PKG_CONFIG_PATH=/opt/gimp/lib/pkgconfig ; /opt/gimp/bin/gimp-2.3
> 
> and I still having the same error.

PKG_CONFIG_PATH only affects where stuff looks as it gets compiled. Also, you'd
want to use PKG_CONFIG_PATH=/opt/gimp/lib/pkgconfig:$PKG_CONFIG_PATH, to keep
the old stuff in there (assuming it's non-empty).

IIRC, you'd want to set $LD_LIBRARY_PATH=/opt/gimp/lib/ for runtime.

___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] about gimp zoom preview new

2007-03-12 Thread Luis A. Florit
Hi Sven,

> On Mon, 2007-03-12 at 19:11 -0300, Luis A. Florit wrote:
>
> > I compiled gimp with './configure --prefix=/opt/gimp'
> > for it not to touch my stable gimp 2.2 RPM install.
> > I am compiling the plug-in with
> >
> > /opt/gimp/bin/gimptool-2.0 --install 
>
> You will probably have to set PKG_CONFIG_PATH to get this right.

I am doing something wrong... I tried with this command:

export PKG_CONFIG_PATH=/opt/gimp/lib/pkgconfig ; /opt/gimp/bin/gimp-2.3

and I still having the same error.

Thanks,

Luis.
___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] about gimp zoom preview new

2007-03-12 Thread Sven Neumann
Hi,

On Mon, 2007-03-12 at 23:13 +0100, Sven Neumann wrote:

> You will probably have to set PKG_CONFIG_PATH to get this right.

Thinking about it, perhaps gimptool-2.0 should do this for you. We could
add something like

 PKG_CONFIG_PATH=$libdir/pkgconfig:$PKG_CONFIG_PATH

to gimptool-2.0.in. Would this be a good idea or am I missing something?


Sven


___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] about gimp zoom preview new

2007-03-12 Thread Sven Neumann
Hi,

On Mon, 2007-03-12 at 19:11 -0300, Luis A. Florit wrote:

> I compiled gimp with './configure --prefix=/opt/gimp'
> for it not to touch my stable gimp 2.2 RPM install.
> I am compiling the plug-in with
> 
> /opt/gimp/bin/gimptool-2.0 --install 

You will probably have to set PKG_CONFIG_PATH to get this right.


Sven


___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] about gimp zoom preview new

2007-03-12 Thread Luis A. Florit
> Hi,
>
> On Mon, 2007-03-12 at 11:22 -0300, Luis A. Florit wrote:
>
> > I added a line 'gimp_zoom_preview_new (drawable);' that I got from
> > http://developer.gimp.org/api/2.0/libgimp/GimpZoomPreview.html
> > The plugin complies just fine, but when trying to run it in
> > gimp 2.3.15 the plugin crashes with a message in the console:
> >
> > : symbol lookup error: :
> undefined symbol: gimp_zoom_preview_new
>
> Looks like the plug-in is not picking up recent enough versions of
> libgimpui. Try ldd on the executable.

Mmmm... I see...

# ldd .gimp-2.3/plug-ins/anulardenoise
linux-gate.so.1 =>  (0x00cf4000)
libgimpui-2.0.so.0 => /usr/lib/libgimpui-2.0.so.0 (0x004f1000)
libgimpwidgets-2.0.so.0 => /usr/lib/libgimpwidgets-2.0.so.0 (0x003db000)
libgimp-2.0.so.0 => /usr/lib/libgimp-2.0.so.0 (0x0034d000)
libgimpcolor-2.0.so.0 => /usr/lib/libgimpcolor-2.0.so.0 (0x002cc000)
libgimpmath-2.0.so.0 => /usr/lib/libgimpmath-2.0.so.0 (0x00101000)
libgimpbase-2.0.so.0 => /usr/lib/libgimpbase-2.0.so.0 (0x0033c000)
libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0x04fa)
libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 (0x053b)
libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0x02aaa000)
libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0x029d8000)
libm.so.6 => /lib/libm.so.6 (0x00d4a000)
libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0 (0x0543f000)
libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0x0533f000)
libcairo.so.2 => /usr/lib/libcairo.so.2 (0x02a3c000)
libgobject-2.0.so.0 => /lib/libgobject-2.0.so.0 (0x02979000)
libgmodule-2.0.so.0 => /lib/libgmodule-2.0.so.0 (0x029d3000)
libdl.so.2 => /lib/libdl.so.2 (0x00d73000)
libglib-2.0.so.0 => /lib/libglib-2.0.so.0 (0x028d9000)
libc.so.6 => /lib/libc.so.6 (0x0011)
libgimpmodule-2.0.so.0 => /usr/lib/libgimpmodule-2.0.so.0 (0x00297000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x00ae4000)
libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x0278c000)
libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x0274f000)
libXext.so.6 => /usr/lib/libXext.so.6 (0x00d9b000)
libXrender.so.1 => /usr/lib/libXrender.so.1 (0x00de9000)
libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0x00dfa000)
libXi.so.6 => /usr/lib/libXi.so.6 (0x02a32000)
libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0x00df4000)
libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0x0278)
/lib/ld-linux.so.2 (0x00bea000)
libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0x0538)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x026a5000)
libz.so.1 => /usr/lib/libz.so.1 (0x00d79000)
libpng12.so.0 => /usr/lib/libpng12.so.0 (0x02727000)
libXau.so.6 => /usr/lib/libXau.so.6 (0x00d8e000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00d93000)
libexpat.so.0 => /lib/libexpat.so.0 (0x00dc6000)

I compiled gimp with './configure --prefix=/opt/gimp'
for it not to touch my stable gimp 2.2 RPM install.
I am compiling the plug-in with

/opt/gimp/bin/gimptool-2.0 --install 

Thanks,

Luis.

___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] about gimp zoom preview new

2007-03-12 Thread Luis A. Florit
> On Mon, 12 Mar 2007 15:22:49 +0100, Luis A. Florit
> <[EMAIL PROTECTED]> wrote:
>
> > (gimp-2.3:21083): Gimp-Plug-In-WARNING **: gimp-2.3:
> > plug_in_flush(): error: Broken pipe
>
> This is nothing to do with the zoom preview mate, you've got a
> blocked toilet!! I should call out a plumber, this could get messy.
> This often happens in older properties due to subsidence or nearby
> tree roots.
>
> LOL !
>
> sorry, had to laugh at the way that error came out. ;)

Sorry, I didn't understand your answer...

I just want to add zoom buttons to the preview window.
I saw that many plugins use this. How to do it?

Thanks,

Luis.

___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer