Ink

Inheritance: java.lang.Object, com.aspose.slides.Shape, com.aspose.slides.GraphicalObject

All Implemented Interfaces: com.aspose.slides.IInk

public class Ink extends GraphicalObject implements IInk

Represents an ink object on a slide.

Methods

MethodDescription
getTraces()Gets all traces containing in the IInk element IInkTrace.
getInkEffectImages()Gets the collection of custom images used to simulate visual effects for ink brushes.

getTraces()

public final IInkTrace[] getTraces()

Gets all traces containing in the IInk element IInkTrace. Read-only.


Example:
 
 Presentation pres = new Presentation("pres.pptx");
 try {
     IInk ink = (IInk)pres.getSlides().get_Item(0).getShapes().get_Item(0);
     IInkTrace[] traces = ink.getTraces();
 } finally {
     if (pres != null) pres.dispose();
 }

Returns: com.aspose.slides.IInkTrace[]

getInkEffectImages()

public static System.Collections.Generic.IGenericDictionary<Integer,IImage> getInkEffectImages()

Gets the collection of custom images used to simulate visual effects for ink brushes. These images are used when rendering ink with specific InkEffectType values, such as Galaxy, Rainbow, etc. By providing your own images, you can control how each ink effect appears.


IImage image = Images.fromFile("image.png");
 ink.getInkEffectImages().addItem(InkEffectType.Galaxy, image);

This property allows replacing the default ink effect textures with user-defined ones, which is particularly useful when default assets are restricted by licensing or unavailable at runtime. Each entry in the dictionary must associate an InkEffectType value with a corresponding IImage object (e.g., Bitmap, or an Aspose image interface).

Returns: com.aspose.ms.System.Collections.Generic.IGenericDictionary<java.lang.Integer,com.aspose.slides.IImage>