1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394
|
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimpedit">
<refmeta>
<refentrytitle role="top_of_page">gimpedit</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimpedit</refname>
<refpurpose>Edit menu functions (cut, copy, paste, clear, etc.)</refpurpose>
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
</refnamediv>
<refsynopsisdiv role="synopsis">
<title role="synopsis.title">Synopsis</title>
<synopsis>
<link linkend="gboolean">gboolean</link> <link linkend="gimp-edit-cut">gimp_edit_cut</link> (<link linkend="gint32">gint32</link> drawable_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-edit-copy">gimp_edit_copy</link> (<link linkend="gint32">gint32</link> drawable_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-edit-copy-visible">gimp_edit_copy_visible</link> (<link linkend="gint32">gint32</link> image_ID);
<link linkend="gint32">gint32</link> <link linkend="gimp-edit-paste">gimp_edit_paste</link> (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="gboolean">gboolean</link> paste_into);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-edit-clear">gimp_edit_clear</link> (<link linkend="gint32">gint32</link> drawable_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-edit-fill">gimp_edit_fill</link> (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="GimpFillType">GimpFillType</link> fill_type);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-edit-bucket-fill">gimp_edit_bucket_fill</link> (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="GimpBucketFillMode">GimpBucketFillMode</link> fill_mode,
<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> paint_mode,
<link linkend="gdouble">gdouble</link> opacity,
<link linkend="gdouble">gdouble</link> threshold,
<link linkend="gboolean">gboolean</link> sample_merged,
<link linkend="gdouble">gdouble</link> x,
<link linkend="gdouble">gdouble</link> y);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-edit-blend">gimp_edit_blend</link> (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="GimpBlendMode">GimpBlendMode</link> blend_mode,
<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> paint_mode,
<link linkend="GimpGradientType">GimpGradientType</link> gradient_type,
<link linkend="gdouble">gdouble</link> opacity,
<link linkend="gdouble">gdouble</link> offset,
<link linkend="GimpRepeatMode">GimpRepeatMode</link> repeat,
<link linkend="gboolean">gboolean</link> reverse,
<link linkend="gboolean">gboolean</link> supersample,
<link linkend="gint">gint</link> max_depth,
<link linkend="gdouble">gdouble</link> threshold,
<link linkend="gboolean">gboolean</link> dither,
<link linkend="gdouble">gdouble</link> x1,
<link linkend="gdouble">gdouble</link> y1,
<link linkend="gdouble">gdouble</link> x2,
<link linkend="gdouble">gdouble</link> y2);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-edit-stroke">gimp_edit_stroke</link> (<link linkend="gint32">gint32</link> drawable_ID);
</synopsis>
</refsynopsisdiv>
<refsect1 role="desc">
<title role="desc.title">Description</title>
<para>
Edit menu functions (cut, copy, paste, clear, etc.)
</para>
</refsect1>
<refsect1 role="details">
<title role="details.title">Details</title>
<refsect2>
<title><anchor id="gimp-edit-cut" role="function"/>gimp_edit_cut ()</title>
<indexterm><primary>gimp_edit_cut</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_edit_cut (<link linkend="gint32">gint32</link> drawable_ID);</programlisting>
<para>
Cut from the specified drawable.
</para>
<para>
If there is a selection in the image, then the area specified by the
selection is cut from the specified drawable and placed in an
internal GIMP edit buffer. It can subsequently be retrieved using
the 'gimp-edit-paste' command. If there is no selection, then the
specified drawable will be removed and its contents stored in the
internal GIMP edit buffer.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable_ID</parameter> :</term>
<listitem><simpara> The drawable to cut from.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE if the cut was successful, FALSE if the selection contained only transparent pixels.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-edit-copy" role="function"/>gimp_edit_copy ()</title>
<indexterm><primary>gimp_edit_copy</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_edit_copy (<link linkend="gint32">gint32</link> drawable_ID);</programlisting>
<para>
Copy from the specified drawable.
</para>
<para>
If there is a selection in the image, then the area specified by the
selection is copied from the specified drawable and placed in an
internal GIMP edit buffer. It can subsequently be retrieved using
the 'gimp-edit-paste' command. If there is no selection, then the
specified drawable's contents will be stored in the internal GIMP
edit buffer.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable_ID</parameter> :</term>
<listitem><simpara> The drawable to copy from.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE if the copy was successful, FALSE if the selection contained only transparent pixels.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-edit-copy-visible" role="function" condition="since:GIMP 2.2"/>gimp_edit_copy_visible ()</title>
<indexterm role="GIMP 2.2"><primary>gimp_edit_copy_visible</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_edit_copy_visible (<link linkend="gint32">gint32</link> image_ID);</programlisting>
<para>
Copy from the projection.
</para>
<para>
If there is a selection in the image, then the area specified by the
selection is copied from the projection and placed in an internal
GIMP edit buffer. It can subsequently be retrieved using the
'gimp-edit-paste' command. If there is no selection, then the
projection's contents will be stored in the internal GIMP edit
buffer.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter> :</term>
<listitem><simpara> The image to copy from.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE if the copy was successful, FALSE if the selection contained only transparent pixels.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-edit-paste" role="function"/>gimp_edit_paste ()</title>
<indexterm><primary>gimp_edit_paste</primary></indexterm><programlisting><link linkend="gint32">gint32</link> gimp_edit_paste (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="gboolean">gboolean</link> paste_into);</programlisting>
<para>
Paste buffer to the specified drawable.
</para>
<para>
This procedure pastes a copy of the internal GIMP edit buffer to the
specified drawable. The GIMP edit buffer will be empty unless a call
was previously made to either 'gimp-edit-cut' or 'gimp-edit-copy'.
The \"paste_into\" option specifies whether to clear the current
image selection, or to paste the buffer \"behind\" the selection.
This allows the selection to act as a mask for the pasted buffer.
Anywhere that the selection mask is non-zero, the pasted buffer will
show through. The pasted buffer will be a new layer in the image
which is designated as the image floating selection. If the image
has a floating selection at the time of pasting, the old floating
selection will be anchored to it's drawable before the new floating
selection is added. This procedure returns the new floating layer.
The resulting floating selection will already be attached to the
specified drawable, and a subsequent call to floating_sel_attach is
not needed.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable_ID</parameter> :</term>
<listitem><simpara> The drawable to paste to.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>paste_into</parameter> :</term>
<listitem><simpara> Clear selection, or paste behind it?
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The new floating selection.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-edit-clear" role="function"/>gimp_edit_clear ()</title>
<indexterm><primary>gimp_edit_clear</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_edit_clear (<link linkend="gint32">gint32</link> drawable_ID);</programlisting>
<para>
Clear selected area of drawable.
</para>
<para>
This procedure clears the specified drawable. If the drawable has an
alpha channel, the cleared pixels will become transparent. If the
drawable does not have an alpha channel, cleared pixels will be set
to the background color. This procedure only affects regions within
a selection if there is a selection active.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable_ID</parameter> :</term>
<listitem><simpara> The drawable to clear from.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-edit-fill" role="function"/>gimp_edit_fill ()</title>
<indexterm><primary>gimp_edit_fill</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_edit_fill (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="GimpFillType">GimpFillType</link> fill_type);</programlisting>
<para>
Fill selected area of drawable.
</para>
<para>
This procedure fills the specified drawable with the fill mode. If
the fill mode is foreground, the current foreground color is used.
If the fill mode is background, the current background color is
used. Other fill modes should not be used. This procedure only
affects regions within a selection if there is a selection active.
If you want to fill the whole drawable, regardless of the selection,
use <link linkend="gimp-drawable-fill"><function>gimp_drawable_fill()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable_ID</parameter> :</term>
<listitem><simpara> The drawable to fill to.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>fill_type</parameter> :</term>
<listitem><simpara> The type of fill.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-edit-bucket-fill" role="function"/>gimp_edit_bucket_fill ()</title>
<indexterm><primary>gimp_edit_bucket_fill</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_edit_bucket_fill (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="GimpBucketFillMode">GimpBucketFillMode</link> fill_mode,
<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> paint_mode,
<link linkend="gdouble">gdouble</link> opacity,
<link linkend="gdouble">gdouble</link> threshold,
<link linkend="gboolean">gboolean</link> sample_merged,
<link linkend="gdouble">gdouble</link> x,
<link linkend="gdouble">gdouble</link> y);</programlisting>
<para>
Fill the area specified either by the current selection if there is
one, or by a seed fill starting at the specified coordinates.
</para>
<para>
This tool requires information on the paint application mode, and
the fill mode, which can either be in the foreground color, or in
the currently active pattern. If there is no selection, a seed fill
is executed at the specified coordinates and extends outward in
keeping with the threshold parameter. If there is a selection in the
target image, the threshold, sample merged, x, and y arguments are
unused. If the sample_merged parameter is non-zero, the data of the
composite image will be used instead of that for the specified
drawable. This is equivalent to sampling for colors after merging
all visible layers. In the case of merged sampling, the x and y
coordinates are relative to the image's origin; otherwise, they are
relative to the drawable's origin.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable_ID</parameter> :</term>
<listitem><simpara> The affected drawable.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>fill_mode</parameter> :</term>
<listitem><simpara> The type of fill.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>paint_mode</parameter> :</term>
<listitem><simpara> The paint application mode.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>opacity</parameter> :</term>
<listitem><simpara> The opacity of the final bucket fill.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>threshold</parameter> :</term>
<listitem><simpara> The threshold determines how extensive the seed fill will be. It's value is specified in terms of intensity levels . This parameter is only valid when there is no selection in the specified image.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>sample_merged</parameter> :</term>
<listitem><simpara> Use the composite image, not the drawable.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter> :</term>
<listitem><simpara> The x coordinate of this bucket fill's application. This parameter is only valid when there is no selection in the specified image.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter> :</term>
<listitem><simpara> The y coordinate of this bucket fill's application. This parameter is only valid when there is no selection in the specified image.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-edit-blend" role="function"/>gimp_edit_blend ()</title>
<indexterm><primary>gimp_edit_blend</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_edit_blend (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="GimpBlendMode">GimpBlendMode</link> blend_mode,
<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> paint_mode,
<link linkend="GimpGradientType">GimpGradientType</link> gradient_type,
<link linkend="gdouble">gdouble</link> opacity,
<link linkend="gdouble">gdouble</link> offset,
<link linkend="GimpRepeatMode">GimpRepeatMode</link> repeat,
<link linkend="gboolean">gboolean</link> reverse,
<link linkend="gboolean">gboolean</link> supersample,
<link linkend="gint">gint</link> max_depth,
<link linkend="gdouble">gdouble</link> threshold,
<link linkend="gboolean">gboolean</link> dither,
<link linkend="gdouble">gdouble</link> x1,
<link linkend="gdouble">gdouble</link> y1,
<link linkend="gdouble">gdouble</link> x2,
<link linkend="gdouble">gdouble</link> y2);</programlisting>
<para>
Blend between the starting and ending coordinates with the specified
blend mode and gradient type.
</para>
<para>
This tool requires information on the paint application mode, the
blend mode, and the gradient type. It creates the specified variety
of blend using the starting and ending coordinates as defined for
each gradient type.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable_ID</parameter> :</term>
<listitem><simpara> The affected drawable.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>blend_mode</parameter> :</term>
<listitem><simpara> The type of blend.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>paint_mode</parameter> :</term>
<listitem><simpara> The paint application mode.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>gradient_type</parameter> :</term>
<listitem><simpara> The type of gradient.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>opacity</parameter> :</term>
<listitem><simpara> The opacity of the final blend.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>offset</parameter> :</term>
<listitem><simpara> Offset relates to the starting and ending coordinates specified for the blend. This parameter is mode dependent.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>repeat</parameter> :</term>
<listitem><simpara> Repeat mode.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>reverse</parameter> :</term>
<listitem><simpara> Use the reverse gradient.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>supersample</parameter> :</term>
<listitem><simpara> Do adaptive supersampling.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>max_depth</parameter> :</term>
<listitem><simpara> Maximum recursion levels for supersampling.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>threshold</parameter> :</term>
<listitem><simpara> Supersampling threshold.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dither</parameter> :</term>
<listitem><simpara> Use dithering to reduce banding.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x1</parameter> :</term>
<listitem><simpara> The x coordinate of this blend's starting point.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y1</parameter> :</term>
<listitem><simpara> The y coordinate of this blend's starting point.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x2</parameter> :</term>
<listitem><simpara> The x coordinate of this blend's ending point.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y2</parameter> :</term>
<listitem><simpara> The y coordinate of this blend's ending point.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-edit-stroke" role="function"/>gimp_edit_stroke ()</title>
<indexterm><primary>gimp_edit_stroke</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_edit_stroke (<link linkend="gint32">gint32</link> drawable_ID);</programlisting>
<para>
Stroke the current selection
</para>
<para>
This procedure strokes the current selection, painting along the
selection boundary with the active brush and foreground color. The
paint is applied to the specified drawable regardless of the active
selection.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable_ID</parameter> :</term>
<listitem><simpara> The drawable to stroke to.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>
|