InkBrush

Inheritance: java.lang.Object

All Implemented Interfaces: com.aspose.slides.IInkBrush

public class InkBrush implements IInkBrush

Represents an inkBrush object.

Methods

MethodDescription
getColor()Gets or sets the brush color for a line.
setColor(Color value)Gets or sets the brush color for a line.
getSize()Gets or sets the brush size for a line in points.
setSize(Dimension2D value)Gets or sets the brush size for a line in points.

getColor()

public final Color getColor()

Gets or sets the brush color for a line.


Example:
 
 Presentation pres = new Presentation("pres.pptx");
 try {
     IInk ink = (IInk)pres.getSlides().get_Item(0).getShapes().get_Item(0);
     IInkTrace[] traces = ink.getTraces();
     IInkBrush brush = traces[0].getBrush();
     Color brushColor = brush.getColor();
     brush.setColor(Color.RED);
 } finally {
     if (pres != null) pres.dispose();
 }

Returns: java.awt.Color

setColor(Color value)

public final void setColor(Color value)

Gets or sets the brush color for a line.


Example:
 
 Presentation pres = new Presentation("pres.pptx");
 try {
     IInk ink = (IInk)pres.getSlides().get_Item(0).getShapes().get_Item(0);
     IInkTrace[] traces = ink.getTraces();
     IInkBrush brush = traces[0].getBrush();
     Color brushColor = brush.getColor();
     brush.setColor(Color.RED);
 } finally {
     if (pres != null) pres.dispose();
 }

Parameters:

ParameterTypeDescription
valuejava.awt.Color

getSize()

public final Dimension2D getSize()

Gets or sets the brush size for a line in points.


Example:
 
 Presentation pres = new Presentation("pres.pptx");
 try {
     IInk ink = (IInk)pres.getSlides().get_Item(0).getShapes().get_Item(0);
     IInkTrace[] traces = ink.getTraces();
     IInkBrush brush = traces[0].getBrush();
     Dimension2D brushSize = brush.getSize();
     brush.setSize(new Dimension(5, 10));
 } finally {
     if (pres != null) pres.dispose();
 }

Returns: java.awt.geom.Dimension2D

setSize(Dimension2D value)

public final void setSize(Dimension2D value)

Gets or sets the brush size for a line in points.


Example:
 
 Presentation pres = new Presentation("pres.pptx");
 try {
     IInk ink = (IInk)pres.getSlides().get_Item(0).getShapes().get_Item(0);
     IInkTrace[] traces = ink.getTraces();
     IInkBrush brush = traces[0].getBrush();
     Dimension2D brushSize = brush.getSize();
     brush.setSize(new Dimension(5, 10));
 } finally {
     if (pres != null) pres.dispose();
 }

Parameters:

ParameterTypeDescription
valuejava.awt.geom.Dimension2D