Ejemplo n.º 1
0
/**
 * gimp_image_rotate:
 * @image_ID: The image.
 * @rotate_type: Angle of rotation.
 *
 * Rotates the image by the specified degrees.
 *
 * This procedure rotates the image.
 *
 * Returns: TRUE on success.
 **/
gboolean
gimp_image_rotate (gint32           image_ID,
                   GimpRotationType rotate_type)
{
  GimpParam *return_vals;
  gint nreturn_vals;
  gboolean success = TRUE;

  return_vals = gimp_run_procedure ("gimp-image-rotate",
                                    &nreturn_vals,
                                    GIMP_PDB_IMAGE, image_ID,
                                    GIMP_PDB_INT32, rotate_type,
                                    GIMP_PDB_END);

  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;

  gimp_destroy_params (return_vals, nreturn_vals);

  return success;
}
Ejemplo n.º 2
0
/**
 * gimp_layer_set_show_mask:
 * @layer_ID: The layer.
 * @show_mask: The new layer's show mask setting.
 *
 * Set the show mask setting of the specified layer.
 *
 * This procedure sets the specified layer's show mask setting. This
 * controls whether the layer or its mask is visible. TRUE indicates
 * that the mask should be visible. If there is no layer mask, this
 * function will return an error.
 *
 * Returns: TRUE on success.
 **/
gboolean
gimp_layer_set_show_mask (gint32   layer_ID,
                          gboolean show_mask)
{
  GimpParam *return_vals;
  gint nreturn_vals;
  gboolean success = TRUE;

  return_vals = gimp_run_procedure ("gimp-layer-set-show-mask",
                                    &nreturn_vals,
                                    GIMP_PDB_LAYER, layer_ID,
                                    GIMP_PDB_INT32, show_mask,
                                    GIMP_PDB_END);

  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;

  gimp_destroy_params (return_vals, nreturn_vals);

  return success;
}
Ejemplo n.º 3
0
/**
 * gimp_item_set_name:
 * @item_ID: The item.
 * @name: The new item name.
 *
 * Set the name of the specified item.
 *
 * This procedure sets the specified item's name.
 *
 * Returns: TRUE on success.
 *
 * Since: 2.8
 **/
gboolean
gimp_item_set_name (gint32       item_ID,
                    const gchar *name)
{
  GimpParam *return_vals;
  gint nreturn_vals;
  gboolean success = TRUE;

  return_vals = gimp_run_procedure ("gimp-item-set-name",
                                    &nreturn_vals,
                                    GIMP_PDB_ITEM, item_ID,
                                    GIMP_PDB_STRING, name,
                                    GIMP_PDB_END);

  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;

  gimp_destroy_params (return_vals, nreturn_vals);

  return success;
}
Ejemplo n.º 4
0
/**
 * gimp_layer_set_mode:
 * @layer_ID: The layer.
 * @mode: The new layer combination mode.
 *
 * Set the combination mode of the specified layer.
 *
 * This procedure sets the specified layer's combination mode.
 *
 * Returns: TRUE on success.
 **/
gboolean
gimp_layer_set_mode (gint32               layer_ID,
                     GimpLayerModeEffects mode)
{
  GimpParam *return_vals;
  gint nreturn_vals;
  gboolean success = TRUE;

  return_vals = gimp_run_procedure ("gimp-layer-set-mode",
                                    &nreturn_vals,
                                    GIMP_PDB_LAYER, layer_ID,
                                    GIMP_PDB_INT32, mode,
                                    GIMP_PDB_END);

  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;

  gimp_destroy_params (return_vals, nreturn_vals);

  return success;
}
Ejemplo n.º 5
0
/**
 * gimp_layer_remove_mask:
 * @layer_ID: The layer from which to remove mask.
 * @mode: Removal mode.
 *
 * Remove the specified layer mask from the layer.
 *
 * This procedure removes the specified layer mask from the layer. If
 * the mask doesn't exist, an error is returned.
 *
 * Returns: TRUE on success.
 **/
gboolean
gimp_layer_remove_mask (gint32            layer_ID,
                        GimpMaskApplyMode mode)
{
  GimpParam *return_vals;
  gint nreturn_vals;
  gboolean success = TRUE;

  return_vals = gimp_run_procedure ("gimp-layer-remove-mask",
                                    &nreturn_vals,
                                    GIMP_PDB_LAYER, layer_ID,
                                    GIMP_PDB_INT32, mode,
                                    GIMP_PDB_END);

  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;

  gimp_destroy_params (return_vals, nreturn_vals);

  return success;
}
Ejemplo n.º 6
0
/**
 * gimp_text_layer_set_color:
 * @layer_ID: The text layer.
 * @color: The color to use for the text.
 *
 * Set the color of the text in the text layer.
 *
 * This procedure sets the text color in the text layer 'layer'.
 *
 * Returns: TRUE on success.
 *
 * Since: GIMP 2.6
 **/
gboolean
gimp_text_layer_set_color (gint32         layer_ID,
                           const GimpRGB *color)
{
  GimpParam *return_vals;
  gint nreturn_vals;
  gboolean success = TRUE;

  return_vals = gimp_run_procedure ("gimp-text-layer-set-color",
                                    &nreturn_vals,
                                    GIMP_PDB_LAYER, layer_ID,
                                    GIMP_PDB_COLOR, color,
                                    GIMP_PDB_END);

  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;

  gimp_destroy_params (return_vals, nreturn_vals);

  return success;
}
Ejemplo n.º 7
0
/**
 * gimp_vectors_stroke_close:
 * @vectors_ID: The vectors object.
 * @stroke_id: The stroke ID.
 *
 * closes the specified stroke.
 *
 * Closes the specified stroke.
 *
 * Returns: TRUE on success.
 *
 * Since: GIMP 2.4
 **/
gboolean
gimp_vectors_stroke_close (gint32 vectors_ID,
                           gint   stroke_id)
{
  GimpParam *return_vals;
  gint nreturn_vals;
  gboolean success = TRUE;

  return_vals = gimp_run_procedure ("gimp-vectors-stroke-close",
                                    &nreturn_vals,
                                    GIMP_PDB_VECTORS, vectors_ID,
                                    GIMP_PDB_INT32, stroke_id,
                                    GIMP_PDB_END);

  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;

  gimp_destroy_params (return_vals, nreturn_vals);

  return success;
}
Ejemplo n.º 8
0
/**
 * gimp_palette_set_columns:
 * @name: The palette name.
 * @columns: The new number of columns.
 *
 * Sets the number of columns to use when displaying the palette
 *
 * This procedures controls how many colors are shown per row when the
 * palette is being displayed. This value can only be changed if the
 * palette is writable. The maximum allowed value is 64.
 *
 * Returns: TRUE on success.
 *
 * Since: GIMP 2.4
 **/
gboolean
gimp_palette_set_columns (const gchar *name,
                          gint         columns)
{
  GimpParam *return_vals;
  gint nreturn_vals;
  gboolean success = TRUE;

  return_vals = gimp_run_procedure ("gimp-palette-set-columns",
                                    &nreturn_vals,
                                    GIMP_PDB_STRING, name,
                                    GIMP_PDB_INT32, columns,
                                    GIMP_PDB_END);

  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;

  gimp_destroy_params (return_vals, nreturn_vals);

  return success;
}
Ejemplo n.º 9
0
/**
 * gimp_palette_delete_entry:
 * @name: The palette name.
 * @entry_num: The index of the added entry.
 *
 * Deletes a palette entry from the specified palette.
 *
 * This procedure deletes an entry from the specified palette. It
 * returns an error if the entry palette does not exist.
 *
 * Returns: TRUE on success.
 *
 * Since: GIMP 2.2
 **/
gboolean
gimp_palette_delete_entry (const gchar *name,
                           gint         entry_num)
{
  GimpParam *return_vals;
  gint nreturn_vals;
  gboolean success = TRUE;

  return_vals = gimp_run_procedure ("gimp-palette-delete-entry",
                                    &nreturn_vals,
                                    GIMP_PDB_STRING, name,
                                    GIMP_PDB_INT32, entry_num,
                                    GIMP_PDB_END);

  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;

  gimp_destroy_params (return_vals, nreturn_vals);

  return success;
}
Ejemplo n.º 10
0
/**
 * gimp_drawable_desaturate:
 * @drawable_ID: The drawable.
 * @desaturate_mode: The formula to use to desaturate.
 *
 * Desaturate the contents of the specified drawable, with the
 * specified formula.
 *
 * This procedure desaturates the contents of the specified drawable,
 * with the specified formula. This procedure only works on drawables
 * of type RGB color.
 *
 * Returns: TRUE on success.
 *
 * Since: GIMP 2.10
 **/
gboolean
gimp_drawable_desaturate (gint32             drawable_ID,
                          GimpDesaturateMode desaturate_mode)
{
  GimpParam *return_vals;
  gint nreturn_vals;
  gboolean success = TRUE;

  return_vals = gimp_run_procedure ("gimp-drawable-desaturate",
                                    &nreturn_vals,
                                    GIMP_PDB_DRAWABLE, drawable_ID,
                                    GIMP_PDB_INT32, desaturate_mode,
                                    GIMP_PDB_END);

  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;

  gimp_destroy_params (return_vals, nreturn_vals);

  return success;
}
Ejemplo n.º 11
0
/**
 * gimp_drawable_posterize:
 * @drawable_ID: The drawable.
 * @levels: Levels of posterization.
 *
 * Posterize the specified drawable.
 *
 * This procedures reduces the number of shades allows in each
 * intensity channel to the specified 'levels' parameter.
 *
 * Returns: TRUE on success.
 *
 * Since: GIMP 2.10
 **/
gboolean
gimp_drawable_posterize (gint32 drawable_ID,
                         gint   levels)
{
  GimpParam *return_vals;
  gint nreturn_vals;
  gboolean success = TRUE;

  return_vals = gimp_run_procedure ("gimp-drawable-posterize",
                                    &nreturn_vals,
                                    GIMP_PDB_DRAWABLE, drawable_ID,
                                    GIMP_PDB_INT32, levels,
                                    GIMP_PDB_END);

  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;

  gimp_destroy_params (return_vals, nreturn_vals);

  return success;
}
Ejemplo n.º 12
0
/**
 * gimp_drawable_fill:
 * @drawable_ID: The drawable.
 * @fill_type: The type of fill.
 *
 * Fill the drawable with the specified fill mode.
 *
 * This procedure fills the drawable. If the fill mode is foreground
 * the current foreground color is used. If the fill mode is
 * background, the current background color is used. If the fill type
 * is white, then white is used. Transparent fill only affects layers
 * with an alpha channel, in which case the alpha channel is set to
 * transparent. If the drawable has no alpha channel, it is filled to
 * white. No fill leaves the drawable's contents undefined.
 * This procedure is unlike gimp_edit_fill() or the bucket fill tool
 * because it fills regardless of a selection. Its main purpose is to
 * fill a newly created drawable before adding it to the image. This
 * operation cannot be undone.
 *
 * Returns: TRUE on success.
 **/
gboolean
gimp_drawable_fill (gint32       drawable_ID,
                    GimpFillType fill_type)
{
  GimpParam *return_vals;
  gint nreturn_vals;
  gboolean success = TRUE;

  return_vals = gimp_run_procedure ("gimp-drawable-fill",
                                    &nreturn_vals,
                                    GIMP_PDB_DRAWABLE, drawable_ID,
                                    GIMP_PDB_INT32, fill_type,
                                    GIMP_PDB_END);

  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;

  gimp_destroy_params (return_vals, nreturn_vals);

  return success;
}
Ejemplo n.º 13
0
/**
 * gimp_drawable_merge_shadow:
 * @drawable_ID: The drawable.
 * @undo: Push merge to undo stack?
 *
 * Merge the shadow buffer with the specified drawable.
 *
 * This procedure combines the contents of the drawable's shadow buffer
 * (for temporary processing) with the specified drawable. The 'undo'
 * parameter specifies whether to add an undo step for the operation.
 * Requesting no undo is useful for such applications as 'auto-apply'.
 *
 * Returns: TRUE on success.
 **/
gboolean
gimp_drawable_merge_shadow (gint32   drawable_ID,
                            gboolean undo)
{
  GimpParam *return_vals;
  gint nreturn_vals;
  gboolean success = TRUE;

  return_vals = gimp_run_procedure ("gimp-drawable-merge-shadow",
                                    &nreturn_vals,
                                    GIMP_PDB_DRAWABLE, drawable_ID,
                                    GIMP_PDB_INT32, undo,
                                    GIMP_PDB_END);

  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;

  gimp_destroy_params (return_vals, nreturn_vals);

  return success;
}
Ejemplo n.º 14
0
/**
 * gimp_drawable_set_image:
 * @drawable_ID: The drawable.
 * @image_ID: The image.
 *
 * Deprecated: There is no replacement for this procedure.
 *
 * Returns: TRUE on success.
 **/
gboolean
gimp_drawable_set_image (gint32 drawable_ID,
                         gint32 image_ID)
{
  GimpParam *return_vals;
  gint nreturn_vals;
  gboolean success = TRUE;

  return_vals = gimp_run_procedure ("gimp-drawable-set-image",
                                    &nreturn_vals,
                                    GIMP_PDB_DRAWABLE, drawable_ID,
                                    GIMP_PDB_IMAGE, image_ID,
                                    GIMP_PDB_END);

  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;

  gimp_destroy_params (return_vals, nreturn_vals);

  return success;
}
Ejemplo n.º 15
0
/**
 * gimp_text_layer_set_base_direction:
 * @layer_ID: The text layer.
 * @direction: The base direction of the text.
 *
 * Set the base direction in the text layer.
 *
 * This procedure sets the base direction used in applying the Unicode
 * bidirectional algorithm when rendering the text.
 *
 * Returns: TRUE on success.
 *
 * Since: GIMP 2.6
 **/
gboolean
gimp_text_layer_set_base_direction (gint32            layer_ID,
                                    GimpTextDirection direction)
{
  GimpParam *return_vals;
  gint nreturn_vals;
  gboolean success = TRUE;

  return_vals = gimp_run_procedure ("gimp-text-layer-set-base-direction",
                                    &nreturn_vals,
                                    GIMP_PDB_LAYER, layer_ID,
                                    GIMP_PDB_INT32, direction,
                                    GIMP_PDB_END);

  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;

  gimp_destroy_params (return_vals, nreturn_vals);

  return success;
}
Ejemplo n.º 16
0
/**
 * gimp_file_save_thumbnail:
 * @image_ID: The image.
 * @filename: The name of the file the thumbnail belongs to.
 *
 * Saves a thumbnail for the given image
 *
 * This procedure saves a thumbnail for the given image according to
 * the Free Desktop Thumbnail Managing Standard. The thumbnail is saved
 * so that it belongs to the file with the given filename. This means
 * you have to save the image under this name first, otherwise this
 * procedure will fail. This procedure may become useful if you want to
 * explicitly save a thumbnail with a file.
 *
 * Returns: TRUE on success.
 **/
gboolean
gimp_file_save_thumbnail (gint32       image_ID,
                          const gchar *filename)
{
  GimpParam *return_vals;
  gint nreturn_vals;
  gboolean success = TRUE;

  return_vals = gimp_run_procedure ("gimp-file-save-thumbnail",
                                    &nreturn_vals,
                                    GIMP_PDB_IMAGE, image_ID,
                                    GIMP_PDB_STRING, filename,
                                    GIMP_PDB_END);

  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;

  gimp_destroy_params (return_vals, nreturn_vals);

  return success;
}
Ejemplo n.º 17
0
/**
 * gimp_text_layer_set_justification:
 * @layer_ID: The text layer.
 * @justify: The justification for your text.
 *
 * Set the justification of the text in a text layer.
 *
 * This procedure sets the alignment of the lines in the text layer
 * relative to each other.
 *
 * Returns: TRUE on success.
 *
 * Since: GIMP 2.6
 **/
gboolean
gimp_text_layer_set_justification (gint32                layer_ID,
                                   GimpTextJustification justify)
{
  GimpParam *return_vals;
  gint nreturn_vals;
  gboolean success = TRUE;

  return_vals = gimp_run_procedure ("gimp-text-layer-set-justification",
                                    &nreturn_vals,
                                    GIMP_PDB_LAYER, layer_ID,
                                    GIMP_PDB_INT32, justify,
                                    GIMP_PDB_END);

  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;

  gimp_destroy_params (return_vals, nreturn_vals);

  return success;
}
Ejemplo n.º 18
0
/**
 * gimp_register_file_handler_priority:
 * @procedure_name: The name of the procedure to set the priority of.
 * @priority: The procedure priority.
 *
 * Sets the priority of a file handler procedure.
 *
 * Sets the priority of a file handler procedure. When more than one
 * procedure matches a given file, the procedure with the lowest
 * priority is used; if more than one procedure has the lowest
 * priority, it is unspecified which one of them is used. The default
 * priority for file handler procedures is 0.
 *
 * Returns: TRUE on success.
 *
 * Since: 2.10.6
 **/
gboolean
gimp_register_file_handler_priority (const gchar *procedure_name,
                                     gint         priority)
{
  GimpParam *return_vals;
  gint nreturn_vals;
  gboolean success = TRUE;

  return_vals = gimp_run_procedure ("gimp-register-file-handler-priority",
                                    &nreturn_vals,
                                    GIMP_PDB_STRING, procedure_name,
                                    GIMP_PDB_INT32, priority,
                                    GIMP_PDB_END);

  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;

  gimp_destroy_params (return_vals, nreturn_vals);

  return success;
}
Ejemplo n.º 19
0
/**
 * gimp_text_layer_set_letter_spacing:
 * @layer_ID: The text layer.
 * @letter_spacing: The additional letter spacing to use.
 *
 * Adjust the letter spacing in a text layer.
 *
 * This procedure sets the additional spacing between the single glyphs
 * in a text layer.
 *
 * Returns: TRUE on success.
 *
 * Since: GIMP 2.6
 **/
gboolean
gimp_text_layer_set_letter_spacing (gint32  layer_ID,
                                    gdouble letter_spacing)
{
  GimpParam *return_vals;
  gint nreturn_vals;
  gboolean success = TRUE;

  return_vals = gimp_run_procedure ("gimp-text-layer-set-letter-spacing",
                                    &nreturn_vals,
                                    GIMP_PDB_LAYER, layer_ID,
                                    GIMP_PDB_FLOAT, letter_spacing,
                                    GIMP_PDB_END);

  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;

  gimp_destroy_params (return_vals, nreturn_vals);

  return success;
}
Ejemplo n.º 20
0
/**
 * gimp_register_file_handler_mime:
 * @procedure_name: The name of the procedure to associate a MIME type with.
 * @mime_types: A comma-separated list of MIME types, such as \"image/jpeg\".
 *
 * Associates MIME types with a file handler procedure.
 *
 * Registers MIME types for a file handler procedure. This allows GIMP
 * to determine the MIME type of the file opened or saved using this
 * procedure. It is recommended that only one MIME type is registered
 * per file procedure; when registering more than one MIME type, GIMP
 * will associate the first one with files opened or saved with this
 * procedure.
 *
 * Returns: TRUE on success.
 *
 * Since: 2.2
 **/
gboolean
gimp_register_file_handler_mime (const gchar *procedure_name,
                                 const gchar *mime_types)
{
  GimpParam *return_vals;
  gint nreturn_vals;
  gboolean success = TRUE;

  return_vals = gimp_run_procedure ("gimp-register-file-handler-mime",
                                    &nreturn_vals,
                                    GIMP_PDB_STRING, procedure_name,
                                    GIMP_PDB_STRING, mime_types,
                                    GIMP_PDB_END);

  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;

  gimp_destroy_params (return_vals, nreturn_vals);

  return success;
}
Ejemplo n.º 21
0
/**
 * gimp_layer_set_opacity:
 * @layer_ID: The layer.
 * @opacity: The new layer opacity.
 *
 * Set the opacity of the specified layer.
 *
 * This procedure sets the specified layer's opacity.
 *
 * Returns: TRUE on success.
 **/
gboolean
gimp_layer_set_opacity (gint32  layer_ID,
                        gdouble opacity)
{
  GimpParam *return_vals;
  gint nreturn_vals;
  gboolean success = TRUE;

  return_vals = gimp_run_procedure ("gimp-layer-set-opacity",
                                    &nreturn_vals,
                                    GIMP_PDB_LAYER, layer_ID,
                                    GIMP_PDB_FLOAT, opacity,
                                    GIMP_PDB_END);

  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;

  gimp_destroy_params (return_vals, nreturn_vals);

  return success;
}
Ejemplo n.º 22
0
/**
 * gimp_register_thumbnail_loader:
 * @load_proc: The name of the procedure the thumbnail loader with.
 * @thumb_proc: The name of the thumbnail load procedure.
 *
 * Associates a thumbnail loader with a file load procedure.
 *
 * Some file formats allow for embedded thumbnails, other file formats
 * contain a scalable image or provide the image data in different
 * resolutions. A file plug-in for such a format may register a special
 * procedure that allows GIMP to load a thumbnail preview of the image.
 * This procedure is then associated with the standard load procedure
 * using this function.
 *
 * Returns: TRUE on success.
 *
 * Since: 2.2
 **/
gboolean
gimp_register_thumbnail_loader (const gchar *load_proc,
                                const gchar *thumb_proc)
{
  GimpParam *return_vals;
  gint nreturn_vals;
  gboolean success = TRUE;

  return_vals = gimp_run_procedure ("gimp-register-thumbnail-loader",
                                    &nreturn_vals,
                                    GIMP_PDB_STRING, load_proc,
                                    GIMP_PDB_STRING, thumb_proc,
                                    GIMP_PDB_END);

  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;

  gimp_destroy_params (return_vals, nreturn_vals);

  return success;
}
Ejemplo n.º 23
0
/**
 * gimp_layer_add_mask:
 * @layer_ID: The layer to receive the mask.
 * @mask_ID: The mask to add to the layer.
 *
 * Add a layer mask to the specified layer.
 *
 * This procedure adds a layer mask to the specified layer. Layer masks
 * serve as an additional alpha channel for a layer. This procedure
 * will fail if a number of prerequisites aren't met. The layer cannot
 * already have a layer mask. The specified mask must exist and have
 * the same dimensions as the layer. The layer must have been created
 * for use with the specified image and the mask must have been created
 * with the procedure 'gimp-layer-create-mask'.
 *
 * Returns: TRUE on success.
 **/
gboolean
gimp_layer_add_mask (gint32 layer_ID,
                     gint32 mask_ID)
{
  GimpParam *return_vals;
  gint nreturn_vals;
  gboolean success = TRUE;

  return_vals = gimp_run_procedure ("gimp-layer-add-mask",
                                    &nreturn_vals,
                                    GIMP_PDB_LAYER, layer_ID,
                                    GIMP_PDB_CHANNEL, mask_ID,
                                    GIMP_PDB_END);

  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;

  gimp_destroy_params (return_vals, nreturn_vals);

  return success;
}
Ejemplo n.º 24
0
/**
 * gimp_text_layer_set_antialias:
 * @layer_ID: The text layer.
 * @antialias: Enable/disable antialiasing of the text.
 *
 * Enable/disable anti-aliasing in a text layer.
 *
 * This procedure enables or disables anti-aliasing of the text in a
 * text layer.
 *
 * Returns: TRUE on success.
 *
 * Since: GIMP 2.6
 **/
gboolean
gimp_text_layer_set_antialias (gint32   layer_ID,
                               gboolean antialias)
{
  GimpParam *return_vals;
  gint nreturn_vals;
  gboolean success = TRUE;

  return_vals = gimp_run_procedure ("gimp-text-layer-set-antialias",
                                    &nreturn_vals,
                                    GIMP_PDB_LAYER, layer_ID,
                                    GIMP_PDB_INT32, antialias,
                                    GIMP_PDB_END);

  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;

  gimp_destroy_params (return_vals, nreturn_vals);

  return success;
}
Ejemplo n.º 25
0
/**
 * gimp_layer_set_lock_alpha:
 * @layer_ID: The layer.
 * @lock_alpha: The new layer's lock alpha channel setting.
 *
 * Set the lock alpha channel setting of the specified layer.
 *
 * This procedure sets the specified layer's lock alpha channel
 * setting.
 *
 * Returns: TRUE on success.
 **/
gboolean
gimp_layer_set_lock_alpha (gint32   layer_ID,
                           gboolean lock_alpha)
{
  GimpParam *return_vals;
  gint nreturn_vals;
  gboolean success = TRUE;

  return_vals = gimp_run_procedure ("gimp-layer-set-lock-alpha",
                                    &nreturn_vals,
                                    GIMP_PDB_LAYER, layer_ID,
                                    GIMP_PDB_INT32, lock_alpha,
                                    GIMP_PDB_END);

  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;

  gimp_destroy_params (return_vals, nreturn_vals);

  return success;
}
Ejemplo n.º 26
0
/**
 * gimp_text_layer_set_hint_style:
 * @layer_ID: The text layer.
 * @style: The new hint style.
 *
 * Control how font outlines are hinted in a text layer.
 *
 * This procedure sets the hint style for font outlines in a text
 * layer. This controls whether to fit font outlines to the pixel grid,
 * and if so, whether to optimize for fidelity or contrast.
 *
 * Returns: TRUE on success.
 *
 * Since: GIMP 2.8
 **/
gboolean
gimp_text_layer_set_hint_style (gint32            layer_ID,
                                GimpTextHintStyle style)
{
  GimpParam *return_vals;
  gint nreturn_vals;
  gboolean success = TRUE;

  return_vals = gimp_run_procedure ("gimp-text-layer-set-hint-style",
                                    &nreturn_vals,
                                    GIMP_PDB_LAYER, layer_ID,
                                    GIMP_PDB_INT32, style,
                                    GIMP_PDB_END);

  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;

  gimp_destroy_params (return_vals, nreturn_vals);

  return success;
}
Ejemplo n.º 27
0
/**
 * gimp_item_attach_parasite:
 * @item_ID: The item.
 * @parasite: The parasite to attach to the item.
 *
 * Add a parasite to an item.
 *
 * This procedure attaches a parasite to an item. It has no return
 * values.
 *
 * Returns: TRUE on success.
 *
 * Since: 2.8
 **/
gboolean
gimp_item_attach_parasite (gint32              item_ID,
                           const GimpParasite *parasite)
{
  GimpParam *return_vals;
  gint nreturn_vals;
  gboolean success = TRUE;

  return_vals = gimp_run_procedure ("gimp-item-attach-parasite",
                                    &nreturn_vals,
                                    GIMP_PDB_ITEM, item_ID,
                                    GIMP_PDB_PARASITE, parasite,
                                    GIMP_PDB_END);

  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;

  gimp_destroy_params (return_vals, nreturn_vals);

  return success;
}
Ejemplo n.º 28
0
/**
 * gimp_text_layer_set_language:
 * @layer_ID: The text layer.
 * @language: The new language to use for the text layer.
 *
 * Set the language of the text layer.
 *
 * This procedure sets the language of the text in text layer. For some
 * scripts the language has an influence of how the text is rendered.
 *
 * Returns: TRUE on success.
 *
 * Since: GIMP 2.6
 **/
gboolean
gimp_text_layer_set_language (gint32       layer_ID,
                              const gchar *language)
{
  GimpParam *return_vals;
  gint nreturn_vals;
  gboolean success = TRUE;

  return_vals = gimp_run_procedure ("gimp-text-layer-set-language",
                                    &nreturn_vals,
                                    GIMP_PDB_LAYER, layer_ID,
                                    GIMP_PDB_STRING, language,
                                    GIMP_PDB_END);

  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;

  gimp_destroy_params (return_vals, nreturn_vals);

  return success;
}
Ejemplo n.º 29
0
/**
 * gimp_item_set_visible:
 * @item_ID: The item.
 * @visible: The new item visibility.
 *
 * Set the visibility of the specified item.
 *
 * This procedure sets the specified item's visibility.
 *
 * Returns: TRUE on success.
 *
 * Since: 2.8
 **/
gboolean
gimp_item_set_visible (gint32   item_ID,
                       gboolean visible)
{
  GimpParam *return_vals;
  gint nreturn_vals;
  gboolean success = TRUE;

  return_vals = gimp_run_procedure ("gimp-item-set-visible",
                                    &nreturn_vals,
                                    GIMP_PDB_ITEM, item_ID,
                                    GIMP_PDB_INT32, visible,
                                    GIMP_PDB_END);

  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;

  gimp_destroy_params (return_vals, nreturn_vals);

  return success;
}
Ejemplo n.º 30
0
/**
 * gimp_selection_combine:
 * @channel_ID: The channel.
 * @operation: The selection operation.
 *
 * Deprecated: Use gimp_image_select_item() instead.
 *
 * Returns: TRUE on success.
 **/
gboolean
gimp_selection_combine (gint32         channel_ID,
                        GimpChannelOps operation)
{
  GimpParam *return_vals;
  gint nreturn_vals;
  gboolean success = TRUE;

  return_vals = gimp_run_procedure ("gimp-selection-combine",
                                    &nreturn_vals,
                                    GIMP_PDB_CHANNEL, channel_ID,
                                    GIMP_PDB_INT32, operation,
                                    GIMP_PDB_END);

  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;

  gimp_destroy_params (return_vals, nreturn_vals);

  return success;
}