
{"id":18591,"date":"2010-12-11T21:57:54","date_gmt":"2010-12-11T16:27:54","guid":{"rendered":"http:\/\/www.froisa.com\/?p=4103"},"modified":"2010-12-11T21:57:54","modified_gmt":"2010-12-11T16:27:54","slug":"text-layer-gimp-2","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2010\/12\/11\/text-layer-gimp-2\/","title":{"rendered":"Relating  inside code which  creates a text layer in GIMP"},"content":{"rendered":"<pre>\n\/* GIMP - The GNU Image Manipulation Program\n * Copyright (C) 1995 Spencer Kimball and Peter Mattis\n *\n * GimpTextLayer\n * Copyright (C) 2002-2004  Sven Neumann\n *\n * This program is free software; you can redistribute it and\/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 2 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n *\/\n\/**\n * gimp_text_layer_new:\n * @image: the #GimpImage the layer should belong to\n * @text: a #GimpText object\n *\n * Creates a new text layer.\n *\n * Return value: a new #GimpTextLayer or %NULL in case of a problem\n **\/\nGimpLayer *\ngimp_text_layer_new (GimpImage *image,\n                     GimpText  *text)\n{\n  GimpTextLayer *layer;\n\n  g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);\n  g_return_val_if_fail (GIMP_IS_TEXT (text), NULL);\n\n  if (! text-&gt;text)\n    return NULL;\n\n  layer = g_object_new (GIMP_TYPE_TEXT_LAYER, NULL);\n\n  gimp_drawable_configure (GIMP_DRAWABLE (layer),\n                           image,\n                           0, 0, 1, 1,\n                           gimp_image_base_type_with_alpha (image),\n                           NULL);\n\n  gimp_text_layer_set_text (layer, text);\n\n  if (! gimp_text_layer_render (layer))\n    {\n      g_object_unref (layer);\n      return NULL;\n    }\n\n  return GIMP_LAYER (layer);\n}\n\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\/* GIMP &#8211; The GNU Image Manipulation Program * Copyright (C) 1995 Spencer Kimball and Peter Mattis * * GimpTextLayer * Copyright (C) 2002-2004 Sven Neumann * * This program is free software; you can redistribute it and\/or modify * it under the terms of the GNU General Public License as published by * the &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.trueangle.org\/index.php\/2010\/12\/11\/text-layer-gimp-2\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Relating  inside code which  creates a text layer in GIMP&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3,141,91],"tags":[825,832],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/18591"}],"collection":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/comments?post=18591"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/18591\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=18591"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=18591"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=18591"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}