Skip to content

Commit 2ed51f3

Browse files
committed
Updated READMEs in Graphics group
1 parent eedd9c4 commit 2ed51f3

File tree

12 files changed

+129
-39
lines changed

12 files changed

+129
-39
lines changed

Samples/Graphics/BlendModes/README.md

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
# Blend modes
2-
This sample shows how to customize a way in which semi-transparent objects will blend on a canvas.
1+
# Set up blend modes in PDF using C# and VB.NET
32

4-
You can use PdfCanvas.BlendMode property to customize how semi-transparent objects (text, images and so on) will blend on a canvas. There is a set of predefined blend modes, please take a look at PdfBlendMode enumeration.
3+
This sample shows how to customize a way in which semi-transparent objects will blend on a canvas using [Docotic.Pdf library](https://bitmiracle.com/pdf-library/).
4+
5+
## Description
6+
7+
You can use the [PdfCanvas.BlendMode](https://api.docotic.com/pdfcanvas-blendmode) property to customize how semi-transparent objects like text, images and so on will blend on a canvas. For the set of predefined blend modes, check the [PdfBlendMode enumeration](https://api.docotic.com/pdfblendmode).
8+
9+
## See also
10+
* [Get free time-limited license key](https://bitmiracle.com/pdf-library/download)
11+
* [Using semi-transparent colors in C# and VB.NET](/Samples/Graphics/Transparency) sample

Samples/Graphics/Clipping/README.md

+11-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1-
# Clipping
2-
This sample shows how to use current graphics path as a clip region of a canvas.
1+
# Set up clipping on a PDF canvas in C# and VB.NET
32

4-
After a graphics path is constructed, you can set it as a clip region of a canvas using PdfCanvas.SetClip method. After a clip region is set, you can fill or stroke it. You can also just continue drawing on a canvas.
3+
This sample shows how to use the current graphics path as a clip region of a canvas.
54

6-
When a clip region is set on a canvas, any part of a drawn object (including text and images) that lay outside the clip region will not be visible.
5+
## Description
6+
7+
[Docotic.Pdf library](https://bitmiracle.com/pdf-library/) provides methods to add vector graphics like lines, curves, and shapes to [graphics path](/Samples/Graphics/Paths). You can set the current graphics path as a clip region of a canvas using the [PdfCanvas.SetClip](https://api.docotic.com/pdfcanvas-setclip) method.
8+
9+
Once you set a clip region, you can fill or stroke it. You can also just continue drawing on a canvas. When a canvas has a clip region, any part of a graphics, text and images that lay outside the clip region will not be visible.
10+
11+
## See also
12+
* [Get free time-limited license key](https://bitmiracle.com/pdf-library/download)
13+
* [Construct graphics paths in C# and VB.NET](/Samples/Graphics/Paths) sample
+11-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
# Color profiles
2-
This sample shows how to load an ICC profile and then create and use a color with that color profile.
1+
# Using color profiles in C# and VB.NET
32

4-
In addition to device-dependent colors Docotic.Pdf library can also use colors with associated color profiles. To use color profiles, first add a color profile to your document using PdfDocument.AddColorProfile method and then use the returned PdfColorProfile object as a parameter when creating a color.
3+
This sample shows how to load an ICC profile in a PDF document and then use this color profile to specify a color.
4+
5+
## Description
6+
7+
Besides device-dependent colors, [Docotic.Pdf library](https://bitmiracle.com/pdf-library/) can use colors with associated color profiles. To use color profiles, first add a color profile to your document using one of the [PdfDocument.AddColorProfile](https://api.docotic.com/pdfdocument-addcolorprofile) methods and then use the returned [PdfColorProfile](https://api.docotic.com/pdfcolorprofile) object as a parameter when creating a color.
8+
9+
## See also
10+
* [Get free time-limited license key](https://bitmiracle.com/pdf-library/download)
11+
* [Setting canvas colors in C# and VB.NET](/Samples/Graphics/Colors) sample
12+
* [Using semi-transparent colors in C# and VB.NET](/Samples/Graphics/Transparency) sample

Samples/Graphics/Colors/README.md

+15-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
1-
# Colors
2-
This sample shows how to use colors.
1+
# Setting canvas colors in C# and VB.NET
32

4-
Docotic.Pdf library supports Gray, RGB and CMYK colors. Corresponding classes are PdfGrayColor, PdfRgbColor and PdfCmykColor.
3+
This sample shows how to use colors on a PDF page canvas.
54

6-
Use PdfCanvas.Pen.Color and PdfCanvas.Brush.Color properties to set color of a pen or a brush to be used on canvas. Pens are used to stroke lines, brushes are used to fill areas and shapes.
5+
## Description
6+
7+
[Docotic.Pdf library](https://bitmiracle.com/pdf-library/) supports Gray, RGB and CMYK device-dependent colors. Corresponding classes are [PdfGrayColor](https://api.docotic.com/pdfgraycolor), [PdfRgbColor](https://api.docotic.com/pdfrgbcolor) and [PdfCmykColor](https://api.docotic.com/pdfcmykcolor).
8+
9+
You can change the color of a [canvas pen](https://api.docotic.com/pdfcanvas-pen) to specify the color for strokes. Use the [PdfPen.Color property](https://api.docotic.com/pdfpen-color) for this.
10+
11+
There is also a [brush](https://api.docotic.com/pdfcanvas-brush) that is used to fill areas and shapes. You can change the brush color using the [PdfBrush.Color property](https://api.docotic.com/pdfbrush-color).
12+
13+
## See also
14+
* [Get free time-limited license key](https://bitmiracle.com/pdf-library/download)
15+
* [Using color profiles in C# and VB.NET](/Samples/Graphics/ColorProfiles) sample
16+
* [Using semi-transparent colors in C# and VB.NET](/Samples/Graphics/Transparency) sample
17+
* [Stroke and fill PDF canvas with patterns in C# and VB.NET](/Samples/Graphics/Patterns) sample
+12-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1-
# Extract paths
2-
This sample shows how to extract vector paths from a page and copy them to a new document.
1+
# Extract paths from PDF in C# and VB.NET
32

4-
Use PdfPath objects in PdfPage.GetObjects() resulting collection to extract vector paths. A path consists of one or more disconnected subpaths. Each subpath comprises a sequence of connected segments.
3+
This sample shows how to extract vector paths from a page and copy them to a new document using [Docotic.Pdf library](https://bitmiracle.com/pdf-library/).
4+
5+
## Description
6+
7+
Use one of the [PdfPage.GetObjects](https://api.docotic.com/pdfpage-getobjects) methods to get the collection of page objects. Then enumerate the collection and use objects of the [PdfPath type](https://api.docotic.com/pdfpath) to extract vector paths.
8+
9+
A path is a one or more disconnected sub-paths. Each sub-path comprises a sequence of connected segments.
10+
11+
## See also
12+
* [Get free time-limited license key](https://bitmiracle.com/pdf-library/download)
13+
* [Vector graphics](https://bitmiracle.com/pdf-library/edit/#graphics)
+11-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1-
# Graphics state
2-
This sample shows how to save and restore graphics state using PdfCanvas.SaveState and PdfCanvas.RestoreState methods.
1+
# Working with graphics state in C# and VB.NET
32

4-
PdfCanvas maintains a set of properties, such as pen, brush, current positions for text and graphics, font, e.t.c. This set of properties is called graphics state.
3+
This sample shows how to save and restore graphics state using [PdfCanvas.SaveState](https://api.docotic.com/pdfcanvas-savestate) and [PdfCanvas.RestoreState](https://api.docotic.com/pdfcanvas-restorestate) methods.
54

6-
Current graphics state can be saved and previously saved state can be restored. Use PdfCanvas.SaveState() method to save current graphics state and PdfCanvas.RestoreState() method to restore last saved graphics state.
5+
## Description
6+
7+
Every [PDF canvas](https://api.docotic.com/pdfcanvas) maintains a set of properties, such as pen, brush, current positions for text and graphics, font, e.t.c. This set of properties is called graphics state.
8+
9+
Using [Docotic.Pdf library](https://bitmiracle.com/pdf-library/) you can save the current graphics state. Later, you can restore the previously saved state. Restoring the saved state is the only way to remove clipping, for example.
10+
11+
## See also
12+
* [Get free time-limited license key](https://bitmiracle.com/pdf-library/download)
13+
* [Set up clipping on a PDF canvas in C# and VB.NET](/Samples/Graphics/Clipping) sample
+11-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1-
# Lines and Curves
2-
This sample shows how to draw straight lines and cubic Bezier curves.
1+
# Draw lines and curves in C# and VB.NET
32

4-
All drawing in a PDF document is done using methods and properties of PdfCanvas class. You can access it using Canvas property of PdfPage, PdfWatermark or PdfPattern classes.
3+
This sample shows how to draw straight lines and cubic Bezier curves on PDF canvas using [Docotic.Pdf library](https://bitmiracle.com/pdf-library/).
54

6-
There is a plenty of methods that draw lines, curves and shapes. All such methods have names that start with "Draw" (e.g. DrawLineTo method). All kinds of lines are drawn using current pen (PdfCanvas.Pen property).
5+
## Description
6+
7+
To draw anything in a PDF document, use the methods and properties of the [PdfCanvas](https://api.docotic.com/pdfcanvas) class. You can access a canvas using the `Canvas` property of [PdfPage](https://api.docotic.com/pdfpage), [PdfXObject](https://api.docotic.com/pdfxobject), or [PdfTilingPattern](https://api.docotic.com/pdftilingpattern) classes.
8+
9+
There are plenty of methods that draw lines, curves and shapes. All these methods have names that start with `Draw` (e.g. `DrawLineTo` method). The [current pen](https://api.docotic.com/pdfcanvas-pen) is used to draw all kinds of lines.
10+
11+
## See also
12+
* [Get free time-limited license key](https://bitmiracle.com/pdf-library/download)
13+
* [Setting canvas colors in C# and VB.NET](/Samples/Graphics/Colors) sample

Samples/Graphics/Paths/README.md

+12-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1-
# Paths
2-
This sample shows how to construct and use graphics path.
1+
# Construct graphics paths in C# and VB.NET
32

4-
Graphics path is a series of connected lines and curves. You can construct a graphics path using methods of PdfCanvas class with names that start with "Append" (e.g. AppendLineTo, AppendRectangle). All those methods do not place any marks on a canvas. Instead, they add corresponding shapes to the current graphics path.
3+
This sample shows how to construct and use graphics paths on PDF canvas using Docotic.Pdf library.
54

6-
When a graphics path is constructed, you can fill, stroke or reset it. You can also use constructed path as a clip region of a canvas.
5+
## Description
6+
7+
Graphics path is a series of connected lines and curves. You can construct a graphics path using methods of the [PdfCanvas](https://api.docotic.com/pdfcanvas) class with names that start with `Append` (e.g. `AppendLineTo`, `AppendRectangle`). All those methods do not place any marks on a canvas. Instead, they add corresponding shapes to the current graphics path.
8+
9+
You can fill, stroke, or reset the constructed graphics path. You can also use the constructed path as a clip region of a canvas.
10+
11+
## See also
12+
* [Get free time-limited license key](https://bitmiracle.com/pdf-library/download)
13+
* [Working with graphics state in C# and VB.NET](/Samples/Graphics/GraphicsState) sample
14+
* [Set up clipping on a PDF canvas in C# and VB.NET](/Samples/Graphics/Clipping) sample

Samples/Graphics/Patterns/README.md

+12-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1-
# Patterns
2-
This sample shows how to use colored and uncolored tiling patterns.
1+
# Stroke and fill PDF canvas with patterns in C# and VB.NET
2+
3+
This sample shows how to use colored and uncolored tiling patterns on a PDF canvas. The code uses [Docotic.Pdf library](https://bitmiracle.com/pdf-library/) API.
4+
5+
## Description
36

47
A tiling pattern consists of a small graphical figure called a pattern cell. Painting with the pattern replicates the cell at fixed horizontal and vertical intervals to fill an area. A colored pattern specifies the colors used to paint the pattern cell. An uncolored pattern does not specify any color information. Instead, the entire pattern cell is painted with a separately specified color each time the pattern is used.
58

6-
PdfTilingPattern class is used for both kinds of tiling patterns. You can add a pattern to your document using PdfDocument.AddColoredPattern or PdfDocument.AddUncoloredPattern method.
9+
The [PdfTilingPattern](https://api.docotic.com/pdftilingpattern) class is used for both kinds of tiling patterns. You can add a pattern to your document using the [PdfDocument.AddColoredPattern](https://api.docotic.com/pdfdocument-addcoloredpattern) or the [PdfDocument.AddUncoloredPattern](https://api.docotic.com/pdfdocument-adduncoloredpattern) method.
10+
11+
For any pattern added to a document, construct its appearance by drawing on the pattern canvas. When done constructing the pattern, use it to stroke lines and shapes and/or to fill areas on a canvas. Use the [Pattern property of a pen](https://api.docotic.com/pdfpen-pattern) to set up the pattern for stroking lines and shapes. Set the pattern object to the [Pattern property of a brush](https://api.docotic.com/pdfbrush-pattern) to use the pattern for filling areas.
712

8-
After a pattern is added to your document you should construct its appearance by drawing on a pattern canvas. When pattern is constructed, you can use it to stroke lines and shapes and/or to fill areas on a canvas. Use PdfCanvas.Pen.Pattern property to stroke lines and shapes or PdfCanvas.Brush.Pattern property to fill areas with a pattern.
13+
## See also
14+
* [Get free time-limited license key](https://bitmiracle.com/pdf-library/download)
15+
* [Setting canvas colors in C# and VB.NET](/Samples/Graphics/Colors) sample
16+
* [Using color profiles in C# and VB.NET](/Samples/Graphics/ColorProfiles) sample

Samples/Graphics/RemovePaths/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ This sample shows how to remove vector paths drawn on a PDF page using [Docotic.
33

44
## Description
55

6-
Use the [PdfPage.RemovePaths](https://bitmiracle.com/pdf-library/api/pdfpage-removepaths) method to remove all or specific vector paths from a PDF page. You can filter paths by color, shape, drawing mode, or other parameters.
6+
Use the [PdfPage.RemovePaths](https://api.docotic.com/pdfpage-removepaths) method to remove all or specific vector paths from a PDF page. You can filter paths by color, shape, drawing mode, or other parameters.
77

88
## See also
99
* [Get free time-limited license key](https://bitmiracle.com/pdf-library/download)

Samples/Graphics/Shapes/README.md

+12-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,12 @@
1-
# Shapes
2-
This sample shows how to draw geometrical shapes, such as circles, ellipses, rectangles and rounded rectangles using PdfCanvas class.
1+
# Draw shapes on PDF canvas in C# and VB.NET
2+
3+
This sample shows how to draw geometrical shapes, such as circles, ellipses, rectangles and rounded rectangles using [Docotic.Pdf library](https://bitmiracle.com/pdf-library/).
4+
5+
## Description
6+
7+
To draw shapes, use these methods of the PdfCanvas class: [DrawCircle](https://api.docotic.com/pdfcanvas-drawcircle), [DrawEllipse](https://api.docotic.com/pdfcanvas-drawellipse), [DrawPie](https://api.docotic.com/pdfcanvas-drawpie), [DrawRectangle](https://api.docotic.com/pdfcanvas-drawrectangle), and [DrawRoundedRectangle](https://api.docotic.com/pdfcanvas-drawroundedrectangle).
8+
9+
## See also
10+
* [Get free time-limited license key](https://bitmiracle.com/pdf-library/download)
11+
* [Setting canvas colors in C# and VB.NET](/Samples/Graphics/Colors) sample
12+
* [Draw lines and curves in C# and VB.NET](/Samples/Graphics/LinesAndCurves) sample
+11-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
# Transparency
2-
This sample shows how to draw on a canvas using semi-transparent colors.
1+
# Using semi-transparent colors in C# and VB.NET
32

4-
Use PdfCanvas.Pen.Opacity and/or PdfCanvas.Brush.Opacity properties to make current pen or brush color semi-transparent. Opacity value ranges from 0 (fully transparent) to 100 (fully opaque).
3+
This sample shows how to use [Docotic.Pdf library](https://bitmiracle.com/pdf-library/) to draw on a PDF canvas using semi-transparent colors.
4+
5+
## Description
6+
7+
You can use semi-transparent colors for both canvas [pen](https://api.docotic.com/pdfcanvas-pen) and [brush](https://api.docotic.com/pdfcanvas-brush). Use the [PdfPen.Opacity](https://api.docotic.com/pdfpen-opacity) and the [PdfBrush.Opacity](https://api.docotic.com/pdfbrush-opacity) property to make current pen or brush color semi-transparent. Opacity value ranges from 0 (fully transparent) to 100 (fully opaque).
8+
9+
## See also
10+
* [Get free time-limited license key](https://bitmiracle.com/pdf-library/download)
11+
* [Setting canvas colors in C# and VB.NET](/Samples/Graphics/Colors) sample
12+
* [Using color profiles in C# and VB.NET](/Samples/Graphics/ColorProfiles) sample

0 commit comments

Comments
 (0)