diff --git a/doc/en/Gdk/Drawable.xml b/doc/en/Gdk/Drawable.xml index 77574e306..32a84b2b7 100644 --- a/doc/en/Gdk/Drawable.xml +++ b/doc/en/Gdk/Drawable.xml @@ -62,17 +62,18 @@ Render a onto the Drawable + object with the specified colors. + A , the graphics context to use + the X position of the left of the layout (in pixels) + the Y position of the top of the layout (in pixels) + the layout to render + the foreground color + the background color + Render a onto the Drawable object, overriding the layout's normal colors with and/or . and - need not be allocated. - A , the graphics context to use - A , the X position of the left of the layout (in pixels) - A , the Y position of the top of the layout (in pixels) - A , the layout to render - A , the foreground color - A , the background color - + need not be allocated. @@ -113,17 +114,21 @@ Render a onto the Drawable + object, overriding the layout's normal colors. + A , the graphics context to use + the X position of the start of string (in pixels) + the Y position of the baseline (in pixels) + A , a line of text to render + the foreground color + the background color + Render a onto the Drawable object, overriding the layout's normal colors with and/or . - and - need not be allocated. - A , the graphics context to use - A , the X position of the start of string (in pixels) - A , the Y position of the baseline (in pixels) - A , a line of text to render - A , the foreground color - A , the background color - + + + and + need not be allocated. + @@ -140,11 +145,16 @@ Render a onto a - A - A - A + The base to use. + the X position of the left of the layout (in pixels) + the Y position of the top of the layout (in pixels) A - If you are using Gtk, the usual way to obtain a is . + + +If the layout's PangoContext has a transformation matrix set, then x and y specify the position of the top left corner of the bounding box (in device space) of the transformed layout. + + +If you are using Gtk, the usual way to obtain a is . @@ -205,21 +215,21 @@ - -

This is a low-level function; 99% of text rendering should be done - using instead.

-

A glyph is a character in a font. This function draws a sequence of - glyphs. To obtain a sequence of glyphs you have to understand a - lot about internationalized text handling, which you don't want to - understand; thus, use instead of this function, - handles the details.

-
+ Low-level glyph drawing function. A A A A A - + + This is a low-level function; 99% of text rendering should be done + using instead. + A glyph is a character in a font. This function draws a sequence of +glyphs. To obtain a sequence of glyphs you have to understand a +lot about internationalized text handling, which you don't want to +understand; thus, use instead of this function, + handles the details. +
@@ -235,14 +245,20 @@ - -

+

Returns a client-side representing the server-side . + A , X coordinate of the upper left corner of the region to get as a drawable + A , Y coordinate of the upper left corner of the region to get as a drawable. + A , width of the rectangle + A , height of the rectangle. + A containing the contents of this Drawable object. + + A stores client-side image data (pixels). In contrast, and are server-side objects. This method obtains the pixels from a server-side drawable as a client-side . -

-

+ + The format of a depends on the of the current display, which makes manipulating extremely difficult; @@ -254,39 +270,29 @@ display-dependent format. Of course, there's a convenience vs. speed tradeoff here, so you'll want to think about what makes sense for your application. -

-
- A , X coordinate of the upper left corner of the region to get as a drawable - A , Y coordinate of the upper left corner of the region to get as a drawable. - A , width of the rectangle - A , height of the rectangle. - A containing the contents of this Drawable object. - -

-

-

+ + , , , and define the region of the drawable to obtain as an image. -

-

+ + You would usually copy image data to the client side if you intend to examine the values of individual pixels, for example to darken an image or add a red tint. It would be prohibitively slow to make a round-trip request to the windowing system for each pixel, so instead you get all of them at once, modify them, then copy them all back at once. -

-

+ + If the X server or other windowing system backend is on the local machine, this function may use shared memory to avoid copying the image data. -

-

- If the source drawable is a #GdkWindow and partially offscreen + + If the source drawable is a #GdkWindow and partially offscreen or obscured, then the obscured portions of the returned image will contain undefined data. -

+
@@ -307,14 +313,7 @@ - - Copies the x region of at coordinates (, - ) to coordinates (, ) in . - and/or may be given as -1, in which case the entire - drawable will be copied. - Most fields in are not used for this operation, but notably the - clip mask or clip region will be honored. - + Draws a portion of a drawable into another. A A , the source Drawable. A @@ -324,15 +323,25 @@ A A + + Copies the x region of at coordinates (, + ) to coordinates (, ) in . + and/or may be given as -1, in which case the entire + drawable will be copied. + Most fields in are not used for this operation, but notably the + clip mask or clip region will be honored. + + + + The source and destination drawables must have the same visual and colormap, or errors will result. (On X11, failure to match visual/colormap results in a BadMatch error from the X server.) A common cause of this problem is an attempt to draw a bitmap to a color drawable. The way to draw a bitmap is to set the - bitmap as a clip mask on your #GdkGC, then use gdk_draw_rectangle() + bitmap as a clip mask on your #GdkGC, then use to draw a rectangle clipped to the bitmap. -

TODO: This API needs to be adjusted; should - probably not exist.

+
@@ -420,17 +429,10 @@ - The color map for this Drawable. You only need to set - the color map if the drawable-creating function did not have a - way to determine the colormap, and you then use drawable operations - that require a colormap. The colormap for all drawables and - graphics contexts you intend to use together should match. i.e. - when using a #GdkGC to draw to a drawable, or copying one drawable - to another, the colormaps should match. - - A - A - + The color map for this Drawable. + The new for the Drawable. + The current on the Drawable. + You only need to set the color map if the drawable-creating function did not have a way to determine the colormap, and you then use drawable operations that require a colormap. The colormap for all drawables and graphics contexts you intend to use together should match. i.e. when using a #GdkGC to draw to a drawable, or copying one drawable to another, the colormaps should match. @@ -440,9 +442,13 @@ Gdk.Region - To be added + Computes the region of a drawable that is potentially visible. A - + This does not necessarily take into account if the window is obscured by other windows, but no area outside of this region is visible. + + +You must call when done. + @@ -452,9 +458,13 @@ Gdk.Region - To be added - A - + Computes the region of a drawable that potentially can be written to by drawing primitives. + A . You must call when done. + Computes the region of a drawable that potentially can be written to by drawing primitives. This region will not take into account the clip region for the GC, and may also not take into account other factors such as if the window is obscured by other windows, but no area outside of this region will be affected by drawing primitives. + + +You must call the Destroy method on the returned region when done. + @@ -464,7 +474,7 @@ Gdk.Visual - To be added + Gets the describing the pixel format of drawable. A @@ -476,9 +486,9 @@ System.Int32 - To be added - A - + Obtains the bit depth of the drawable. + The bit depth. + Obtains the bit depth of the drawable, that is, the number of bits that make up a pixel in the drawable's visual. Examples are 8 bits per pixel, 24 bits per pixel, etc. @@ -488,7 +498,7 @@ Gdk.Screen - To be added + Gets the associated with a a @@ -500,8 +510,8 @@ Gdk.Display - To be added - a + Gets the associated with the . + The . @@ -516,10 +526,10 @@ - To be added + Draws a series of lines connecting the given points. a a - + The way in which joins between lines are draw is determined by the value in the . This can be set with property. @@ -574,7 +584,7 @@ - To be added + Draws a line, using the foreground color and other attributes of the a a a @@ -600,23 +610,19 @@ - To be added + Draws an arc or a filled 'pie slice'. a a - a -The x-coordinate of the upper left hand of the bounding box of the arc. - - a -The y-coordinate of the upper left hand of the bounding box of the arc. - - a - a - a -The starting angle of the arc in the clockwise direction in reference to the 3'oclock position in terms of 1/64th of a degree. - - a -The number of 1/64ths of a degree to sweep the arc in a clockwise direction relative to the starting angle. - + The x-coordinate of the upper left hand of the bounding box of the arc. + + The y-coordinate of the upper left hand of the bounding box of the arc. + + the width of the bounding rectangle. + the height of the bounding rectangle. + The starting angle of the arc in the clockwise direction in reference to the 3'oclock position in terms of 1/64th of a degree. + + The number of 1/64ths of a degree to sweep the arc in a clockwise direction relative to the starting angle. + Draw the left side of a circle with a radius of 5 units. @@ -646,19 +652,24 @@ The number of 1/64ths of a degree to sweep the arc in a clockwise direction rela - To be added - a - a - a - a - a - a - a - a - a - a - a - + Renders a rectangular portion of a to a + A used for clipping. + The to render + Source X coordinate within pixbuf. + Source Y coordinates within pixbuf. + Destination X coordinate within drawable. + Destination Y coordinate within drawable. + Width of region to render, in pixels, or -1 to use pixbuf width. + Height of region to render, in pixels, or -1 to use pixbuf height. + Dithering mode for GdkRGB. + X offset for dither. + Y offset for dither. + The destination drawable must have a colormap. All windows have a colormap, however, pixmaps only have colormap by default if they were created with a non-NULL window argument. Otherwise a colormap must be set on them on the property. + +On older X servers, rendering pixbufs with an alpha channel involves round trips to the X server, and may be somewhat slow. + +The clip mask of gc is ignored, but clip rectangles and clip regions work fine. + @@ -942,13 +953,13 @@ The number of 1/64ths of a degree to sweep the arc in a clockwise direction rela - To be added + Deprecated: use instead. a a a a a - To be added + Deprecated. @@ -965,14 +976,14 @@ The number of 1/64ths of a degree to sweep the arc in a clockwise direction rela - To be added + Deprecated: draws a numbre of wide-char characters a a a a a a - To be added + Use instead. @@ -989,7 +1000,7 @@ The number of 1/64ths of a degree to sweep the arc in a clockwise direction rela - To be added + Deprecated: use instead. a a a @@ -1008,7 +1019,7 @@ The number of 1/64ths of a degree to sweep the arc in a clockwise direction rela - To be added + This method is deprecated, do not use. a a To be added @@ -1043,7 +1054,7 @@ The number of 1/64ths of a degree to sweep the arc in a clockwise direction rela - To be added + Copies a portion of drawable into the client side image structure image. a a a @@ -1079,11 +1090,12 @@ The number of 1/64ths of a degree to sweep the arc in a clockwise direction rela - To be added + This method is deprecated and should not be used with new code. a a a - To be added + This method is deprecated and should not be used in newly-written code. +