Search in sources :

Example 1 with Image

use of com.bitwig.extension.api.graphics.Image in project DrivenByMoss by git-moss.

the class GraphicsContextImpl method maskImage.

/**
 * {@inheritDoc}
 */
@Override
public void maskImage(final IImage icon, final double x, final double y, final ColorEx maskColor) {
    final ImageImpl imageImpl = (ImageImpl) icon;
    try {
        this.setColor(maskColor);
        final Image image = imageImpl.image();
        this.gc.mask(image, x, y);
        this.gc.fill();
    } catch (final RuntimeException ex) {
        ex.printStackTrace();
    }
}
Also used : Image(com.bitwig.extension.api.graphics.Image) IImage(de.mossgrabers.framework.graphics.IImage)

Aggregations

Image (com.bitwig.extension.api.graphics.Image)1 IImage (de.mossgrabers.framework.graphics.IImage)1