Pen Class |
Namespace: Aspose.PSD
The Pen type exposes the following members.
Name | Description | |
---|---|---|
![]() | Pen(Brush) |
Initializes a new instance of the Pen class with the specified Brush.
|
![]() | Pen(Color) |
Initializes a new instance of the Pen class with the specified color.
|
![]() | Pen(Brush, Single) | |
![]() | Pen(Color, Single) |
Name | Description | |
---|---|---|
![]() | Alignment |
Gets or sets the alignment for this Pen.
|
![]() | Brush |
Gets or sets the Brush that determines attributes of this Pen.
|
![]() | Color |
Gets or sets the color of this Pen.
|
![]() | CompoundArray |
Gets or sets an array of values that specifies a compound pen. A compound pen draws a compound line made up of parallel lines and spaces.
|
![]() | CustomEndCap |
Gets or sets a custom cap to use at the end of lines drawn with this Pen.
|
![]() | CustomStartCap |
Gets or sets a custom cap to use at the beginning of lines drawn with this Pen.
|
![]() | DashCap |
Gets or sets the cap style used at the end of the dashes that make up dashed lines drawn with this Pen.
|
![]() | DashOffset |
Gets or sets the distance from the start of a line to the beginning of a dash pattern.
|
![]() | DashPattern |
Gets or sets an array of custom dashes and spaces.
|
![]() | DashStyle |
Gets or sets the style used for dashed lines drawn with this Pen.
|
![]() | EndCap |
Gets or sets the cap style used at the end of lines drawn with this Pen.
|
![]() | LineJoin |
Gets or sets the join style for the ends of two consecutive lines drawn with this Pen.
|
![]() | MiterLimit |
Gets or sets the limit of the thickness of the join on a mitered corner.
|
![]() | Opacity |
Gets or sets the object's opacity. The value should be between 0 and 1. Value of 0 means that object is fully visible, value of 1 means the object is fully opaque.
(Inherited from TransparencySupporter.) |
![]() | PenType |
Gets the style of lines drawn with this Pen.
|
![]() | StartCap |
Gets or sets the cap style used at the beginning of lines drawn with this Pen.
|
![]() | Transform |
Gets or sets a copy of the geometric transformation for this Pen.
|
![]() | Width |
Gets or sets the width of this Pen, in units of the Graphics object used for drawing.
|
Name | Description | |
---|---|---|
![]() | Equals | (Inherited from Object.) |
![]() | Finalize | (Inherited from Object.) |
![]() | GetHashCode | (Inherited from Object.) |
![]() | GetType | (Inherited from Object.) |
![]() | MemberwiseClone | (Inherited from Object.) |
![]() | MultiplyTransform(Matrix) |
Multiplies the transformation matrix for this Pen by the specified Matrix.
|
![]() | MultiplyTransform(Matrix, MatrixOrder) |
Multiplies the transformation matrix for this Pen by the specified Matrix in the specified order.
|
![]() | ResetTransform |
Resets the geometric transformation matrix for this Pen to identity.
|
![]() | RotateTransform(Single) |
Rotates the local geometric transformation by the specified angle. This method prepends the rotation to the transformation.
|
![]() | RotateTransform(Single, MatrixOrder) |
Rotates the local geometric transformation by the specified angle in the specified order.
|
![]() | ScaleTransform(Single, Single) |
Scales the local geometric transformation by the specified factors. This method prepends the scaling matrix to the transformation.
|
![]() | ScaleTransform(Single, Single, MatrixOrder) |
Scales the local geometric transformation by the specified factors in the specified order.
|
![]() | SetLineCap |
Sets the values that determine the style of cap used to end lines drawn by this Pen.
|
![]() | ToString | (Inherited from Object.) |
![]() | TranslateTransform(Single, Single) |
Translates the local geometric transformation by the specified dimensions. This method prepends the translation to the transformation.
|
![]() | TranslateTransform(Single, Single, MatrixOrder) |
Translates the local geometric transformation by the specified dimensions in the specified order.
|
[C#] //Create an instance of Image using (Aspose.PSD.Image image = new Aspose.PSD.FileFormats.Psd.PsdImage(500, 500)) { //Create an instance of Graphics and initialize it with Image object Aspose.PSD.Graphics graphics = new Aspose.PSD.Graphics(image); //Clear the Graphics sutface with White Color graphics.Clear(Aspose.PSD.Color.White); //Create an instance of Pen with color Red and width 5 Aspose.PSD.Pen pen = new Pen(Aspose.PSD.Color.Red, 5); //Create an instance of HatchBrush and set its properties Aspose.PSD.Brushes.HatchBrush brush = new Aspose.PSD.Brushes.HatchBrush(); brush.BackgroundColor = Color.Wheat; brush.ForegroundColor = Color.Red; //Create an instance of Pen //initialize it with HatchBrush object and width Aspose.PSD.Pen brusedpen = new Pen(brush, 5); //Draw Rectangles by specifying Pen object graphics.DrawRectangles(pen, new[] { new Rectangle(new Point(210, 210), new Size(100, 100)), new Rectangle(new Point(110, 110), new Size(100, 100)), new Rectangle(new Point(310, 310), new Size(100, 100)) }); //Draw Rectangles by specifying Pen object graphics.DrawRectangles(brusedpen, new[] { new Rectangle(new Point(310, 110), new Size(100, 100)), new Rectangle(new Point(110, 310), new Size(100, 100)) }); // Create export options and initialize them. Aspose.PSD.ImageOptions.Jpeg2000Options options = new Aspose.PSD.ImageOptions.Jpeg2000Options(); // save all changes. image.Save("c:\\temp\\output.jp2", options); }