InkBrush
Inheritance: java.lang.Object
All Implemented Interfaces: com.aspose.slides.IInkBrush
public class InkBrush implements IInkBrush
Represents an inkBrush object.
Methods
| Method | Description |
|---|---|
| getColor() | Gets or sets the brush color for a line. |
| setColor(Integer value) | Gets or sets the brush color for a line. |
| getSize() | Gets or sets the brush size for a line in points. |
| setSize(SizeF value) | Gets or sets the brush size for a line in points. |
| getInkEffect() | Gets the ink effect type (e.g., Galaxy, Gold, Silver) that defines the visual style of the ink stroke. |
getColor()
public final Integer 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.lang.Integer
setColor(Integer value)
public final void setColor(Integer 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:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.Integer |
getSize()
public final SizeF 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(); SizeF brushSize = brush.getSize(); brush.setSize(new com.aspose.slides.android.Size(5, 10)); } finally { if (pres != null) pres.dispose(); }
Returns: SizeF
setSize(SizeF value)
public final void setSize(SizeF 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(); SizeF brushSize = brush.getSize(); brush.setSize(new com.aspose.slides.android.Size(5, 10)); } finally { if (pres != null) pres.dispose(); }
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | SizeF |
getInkEffect()
public final int getInkEffect()
Gets the ink effect type (e.g., Galaxy, Gold, Silver) that defines the visual style of the ink stroke. The value is parsed from the brush property “inkEffects”. If no recognized effect is specified, InkEffectType.NotDefined is returned.
Returns: int