From cf6f94c1b9379eb39d7000b13e301fab38b70f4d Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Wed, 2 Mar 2016 23:49:43 -0500 Subject: [PATCH] Updated documentation --- docs/en/SkiaSharp/SKCanvas.xml | 146 +++++++++++++++++++++++++-------- docs/en/SkiaSharp/SKPaint.xml | 94 ++++++++++++++++++--- docs/en/index.xml | 3 - docs/en/ns-.xml | 6 ++ 4 files changed, 199 insertions(+), 50 deletions(-) create mode 100644 docs/en/ns-.xml diff --git a/docs/en/SkiaSharp/SKCanvas.xml b/docs/en/SkiaSharp/SKCanvas.xml index eb558423..0c2130c8 100644 --- a/docs/en/SkiaSharp/SKCanvas.xml +++ b/docs/en/SkiaSharp/SKCanvas.xml @@ -13,22 +13,18 @@ Encapsulates all of the state about drawing into a device (bitmap). Encapsulates all of the state about drawing into a device (bitmap). - - + This includes a reference to the device itself, and a stack of matrix/clip values. For any given draw call (e.g. drawRect), the geometry of the object being drawn is transformed by the concatenation of all the matrices in the stack. The transformed geometry is clipped by the intersection of all of the clips in the stack. - - + While the Canvas holds the state of the drawing device, the state (style) of the object being drawn is held by the Paint, which is provided as a parameter to each of the draw() methods. The Paint holds attributes such as color, typeface, the text size, the stroke width, the shader (for example, gradients, patterns), etc. - - + The SkCanvas is returned when accessing the  property of a surface. Transformations The  supports a number of 2D transformations.   Unlike other 2D graphic systems like CoreGraphics or Cairo, SKCanvas extends the transformations to include perspectives.    You can use the  to perform some of the most common 2D transformations.    For more control you can use the  to set an arbitrary transformation using the  and the  to concatenate an  transformation to the current matrix in use. The  can be used to reset the state of the matrix - - + Drawing The drawing operations can take a  parameter to affect their drawing.  You use  objects to cache the style and color information to draw geometries, texts and bitmaps. Clipping Path @@ -36,12 +32,9 @@ It is possible to save the current transformations by calling the  method which preserves the current transformation matrix, you can then alter the matrix and restore the previous state by using the  or  methods.    Additionally, it is possible to push a new state with  which will make an offscreen copy of a region, and once the drawing is completed, calling the  method which copies the offscreen bitmap into this canvas. The example below shows a typical use: - - - - - - + + + The transfer mode for the color. Fills the current clipping path with the specified color using the specified transfer mode. - - + @@ -463,8 +455,7 @@ The paint used to draw the picture, or . Draws a picture on the canvas. - - + @@ -565,20 +556,15 @@ Draws an array of points, lines or a polygon in the canvas. For all modes, the count parameter is interpreted as the total number of points. For kLine mode, count/2 line segments are drawn. - - + For point mode, each point is drawn centered at its coordinate, and its size is specified by the paint's stroke-width. It draws as a square, unless the paint's cap-type is round, in which the points are drawn as circles. - - + For line mode, each pair of points is drawn as a line segment, respecting the paint's settings for cap, join and width.  - - + For polygon mode, the entire array is drawn as a series of connected line segments. - - + Note that, while similar, the line and polygon modes draw slightly differently than the equivalent path built with a series of move to, line to calls, in that the path will draw all of its contours at once, with no interactions if contours intersect each other (think XOR xfermode).  DrawPoints always draws each element one at a time. - - + @@ -630,6 +616,35 @@ + + + + Method + + 1.0.0.0 + + + System.Void + + + + + + + + + Contains a pointer to a region holding UTF-8 encoded text to draw. + Number of bytes to read from the  + Describes the position for each glyph in the  string. + The paint used to draw the text. + Draws text from a UTF-8 buffer at specified locations on the canvas. + + Draw the text, with each character/glyph origin specified by the  array. The origin is interpreted by the Align setting in the paint. + + The parameter is a pointer to a region in memory that contains a UTF-8 encoded block of text.   This only consumes up to bytes from the buffer. + + + @@ -657,6 +672,37 @@ + + + + Method + + 1.0.0.0 + + + System.Void + + + + + + + + + + Contains a pointer to a region holding UTF-8 encoded text to draw. + Number of bytes to read from the  + The x-coordinate of the origin of the text being drawn + The y-coordinate of the origin of the text being drawn + The paint used to draw the text. + Draws text encoded in a UTF-8 buffer on the canvas. + + Draws the , with origin at (,), using the specified . The origin is interpreted based on the Align setting in the paint. + + The  parameter is a pointer to a region in memory that contains a UTF-8 encoded block of text.   This only consumes up to  bytes from the buffer. + + + @@ -690,6 +736,38 @@ + + + + Method + + 1.0.0.0 + + + System.Void + + + + + + + + + + + Contains a pointer to a region holding UTF-8 encoded text to draw. + Number of bytes to read from the  + The path the text should follow for its baseline. + The distance along the path to add to the text’s starting position. + The distance above(-) or below(+) the path to position the text. + The paint used to draw the text. + Draws text encoded in a UTF-8 buffer on the canvas following a bezier path. + + Draw the , using the specified , along the specified . The paint's Align setting determins where along the path to start the text. + The  parameter is a pointer to a region in memory that contains a UTF-8 encoded block of text.   This only consumes up to  bytes from the buffer. + + + @@ -723,8 +801,7 @@ Restore the canvas state. This call balances a previous call to , and is used to remove all modifications to the matrix, clip and draw filter state since the last Save call. - - + It is an error to call Restore() more times than Save() was called. @@ -769,8 +846,7 @@ The number of degrees to rotate. Preconcat the current matrix with the specified rotation. - - + @@ -791,8 +867,7 @@ The number of radiants to rotate. Preconcat the current matrix with the specified rotation. - - + @@ -832,8 +907,7 @@ This will equal the number of Save calls minus Retore calls + 1. The save count on a new canvas is 1. - - + diff --git a/docs/en/SkiaSharp/SKPaint.xml b/docs/en/SkiaSharp/SKPaint.xml index e6d0c9a7..d5781261 100644 --- a/docs/en/SkiaSharp/SKPaint.xml +++ b/docs/en/SkiaSharp/SKPaint.xml @@ -49,7 +49,7 @@ Measure the text, stopping early if the measured width exceeds . Return the number of characters of text that were measured.  - + @@ -72,22 +72,45 @@ The text to be measured Maximum width. Only the subset of text whose accumulated widths are <= are measured. - - + Returns the actual width of the measured text Measure the text, stopping early if the measured width exceeds . - - + Return the number of characters of text that were measured.  - - + + + + + Method + + 1.0.0.0 + + + System.Int64 + + + + + + + + + Contains a pointer to a region holding text encoded using the encoding specified in  format. + Number of bytes to read from the  + Maximum width. Only the subset of text whose accumulated widths are <=  are measured. + Returns the actual width of the measured text + Measure the text encoded as a UTF-8 buffer, stopping early if the measured width exceeds . + Return the number of characters of text that were measured.  + The  parameter is a pointer to a region in memory that contains text encoded in the  format.   This only consumes up to  bytes from the buffer. + + @@ -101,7 +124,7 @@ The paint’s color. - + Note that the color is a 32bit value containing alpha as well as r,g,b. This 32bit value is not premultiplied, meaning that its alpha can be any value, regardless of the values of r,g,b. @@ -229,6 +252,28 @@ + + + + Method + + 1.0.0.0 + + + System.Single + + + + + + + Contains a pointer to a region holding text encoded using the encoding specified in  format. + Number of bytes to read from the  + Measures the UTF-8 encoded text. + Returns the width of the text. + The  parameter is a pointer to a region in memory that contains text encoded in the  format.   This only consumes up to  bytes from the buffer. + + @@ -251,6 +296,33 @@ This will return the vertical measure if this is vertical text, in which case the returned value should be treated has a height instead of a width. + + + + Method + + 1.0.0.0 + + + System.Single + + + + + + + + Contains a pointer to a region holding text encoded using the encoding specified in  format. + Number of bytes to read from the  + Returns the bounds of the text relative to (0,0) + Measures the UTF-8 encoded text. + Returns the width of the text. + + This will return the vertical measure if this is vertical text, in which case the returned value should be treated has a height instead of a width. + The  parameter is a pointer to a region in memory that contains text encoded in the  format.   This only consumes up to  bytes from the buffer. + + + @@ -364,9 +436,9 @@ SkiaSharp.SKTextEncoding - To be added. - To be added. - To be added. + The encoding used by the text. + The encoding used by the various text measuring primitives. + This defaults to UTF8 encoding. diff --git a/docs/en/index.xml b/docs/en/index.xml index bf41af2b..d0050f79 100644 --- a/docs/en/index.xml +++ b/docs/en/index.xml @@ -35,9 +35,6 @@ System.Runtime.CompilerServices.RuntimeCompatibility(WrapNonExceptionThrows=true) - - System.Runtime.Versioning.TargetFramework(".NETFramework,Version=v4.5", FrameworkDisplayName="") - diff --git a/docs/en/ns-.xml b/docs/en/ns-.xml new file mode 100644 index 00000000..36dfeb30 --- /dev/null +++ b/docs/en/ns-.xml @@ -0,0 +1,6 @@ + + + To be added. + To be added. + +