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

New text_layer.pdb file for the PDB

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.

3 of 3 messages available
Toggle history

Please log in to manage your subscriptions.

New text_layer.pdb file for the PDB Marcus Heese 14 Mar 13:59
  New text_layer.pdb file for the PDB Sven Neumann 14 Mar 18:55
  New text_layer.pdb file for the PDB Sven Neumann 14 Mar 19:10
Marcus Heese
2008-03-14 13:59:12 UTC (about 17 years ago)

New text_layer.pdb file for the PDB

Hello together,

so for now I've finished my work on the new implementation of the text layer in the PDB api.

The most actualized version can always be downloaded from here: http://www.cip.ifi.lmu.de/~heese/text_layer.pdb

All my tests have been made with gimp-2.4.5 and the "Irb console" from gimp-ruby. So far as I have tested I didn't run into any further problems except that I couldn't work any further with a well-returned Vectors-object from my gimp-vectors-from-text-layer() function. Here is an example output from that specific problem:

Interactive Gimp-Ruby Console Ruby version 1.8.6

irb(main):001:0> image = Image.new(600,600,RGB_IMAGE) => #
irb(main):002:0> tl = gimp_text_layer_new(image,"haha", Context.get_font(),10,10,100,0)
=> #
irb(main):003:0> image.add_layer(tl,-1) => nil
irb(main):004:0> display = Display.new(image) => #
irb(main):006:0> vectors = gimp_vectors_from_text_layer(image,tl) => #
irb(main):007:0> image.add_vectors(vectors,-1) TypeError: Bad Argument: #A PATH cannot be created from a Gimp::Vectors from /opt/gimp-2.4/lib/gimp/2.0/ruby/pdb.rb:90:in `convert_args' from /opt/gimp-2.4/lib/gimp/2.0/ruby/pdb.rb:113:in `call' from (eval):3:in `add_vectors'
from (irb):7

Also I want to extend the gimp-text-layer-get-coordinates() function. I've written into the HELP text what I think what should be extended.

For a correct compile I needed to add PANGOFT2 cflags into the includes in the Makefile in the "app/pdb" directory. Anything else should work out of the box!

Anyway, I hope the code I've written can be useful for gimp-2.6!

best regards Marcus

Sven Neumann
2008-03-14 18:55:50 UTC (about 17 years ago)

New text_layer.pdb file for the PDB

Hi,

On Fri, 2008-03-14 at 13:59 +0100, Marcus Heese wrote:

so for now I've finished my work on the new implementation of the text layer in the PDB api.

Thanks a lot.

The most actualized version can always be downloaded from here: http://www.cip.ifi.lmu.de/~heese/text_layer.pdb

I don't think we want to expose the outline feature since it is not yet implemented. Please remove this. It would be nice if you could also remove the gimp-text-layer-get-coordinates procedure as this API needs further discussion. Then please attach the .pdb file with these changes to bug #164539 so that we can make sure that it gets committed into SVN.

Sven

Sven Neumann
2008-03-14 19:10:01 UTC (about 17 years ago)

New text_layer.pdb file for the PDB

Hi,

On Fri, 2008-03-14 at 13:59 +0100, Marcus Heese wrote:

Hello together,

so for now I've finished my work on the new implementation of the text layer in the PDB api.

The most actualized version can always be downloaded from here: http://www.cip.ifi.lmu.de/~heese/text_layer.pdb

Oh, and it would be nice if you could remove the commented out function gimp_layer_is_text_layer(). And please inline the gimp_text variable where possible:

gimp_text = gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)); g_object_get (gimp_text,
"text", &text,
NULL);

should become:

g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer), "text", &text,
NULL);

We can probably factor out some common code like the check if the passed drawable is a text layer. But that can as well be done in a second step.

Sven