Interface DrawableRenderer<G>

All Superinterfaces:
Cloneable

public interface DrawableRenderer<G> extends Cloneable
A renderer that can render a visual representation onto a target.
  • Method Details

    • setAttribute

      void setAttribute(String name, Object value) throws IllegalArgumentException
      Allows the user to set specific attributes on the underlying implementation.
      Parameters:
      name - The name of the attribute.
      value - The value of the attribute.
      Throws:
      IllegalArgumentException - thrown if the underlying implementation doesn't recognize the attribute.
    • getAttribute

      Object getAttribute(String name) throws IllegalArgumentException
      Allows the user to retrieve specific attributes on the underlying implementation.
      Parameters:
      name - The name of the attribute.
      Returns:
      value The value of the attribute.
      Throws:
      IllegalArgumentException - thrown if the underlying implementation doesn't recognize the attribute.
    • hasAttribute

      boolean hasAttribute(String name)
    • render

      void render(G target, AffineTransform transform, Drawable drawable, Rectangle bounds, MTLanguage currentLanguage, MTColorTransformer colorTransformer, Paint borderPaint, Stroke borderStroke, Paint textPaint)
      Renders a drawable to a target.
      Parameters:
      target - The target to render to.
      transform - The transform.
      drawable - The drawable to render.
      bounds - The bounds to render the drawable to.
      currentLanguage - The current language used when rendering.
      colorTransformer - A color transformer that transforms the FILL and STROKE colors returned by the drawable where @code{isPaintTransformable(FILL, index) == true} and @code{isPaintTransformable(STROKE, index) == true} respectively. If null the paints returned by the drawable is used. The exception is when @code{isBorder(index) == true}, in which case the transformer will not be used.
      borderPaint - The stroke paint used if isPaintTransformable(PaintMode.STROKE, index) == true && isBorder(index) == true. If null then the stroke paint returned by the drawable is used.
      borderStroke - The stroke used if isBorder(index) == true. If @code{null} then the stroke returned by the drawable is used.
      textPaint - The text paint used if isPaintTransformable(PaintMode.TEXT, index) == true. If null then the text paint returned by the drawable is used.
    • clone

      Throws:
      CloneNotSupportedException