reinit method

void reinit()

(Re)Initializes the paint objects based on the current render instruction.

Implementation

void reinit() {
  paintFront = null;
  paintBack = null;
  if (!renderinstruction.isFillTransparent()) paintFront = UiPaint.fill(color: renderinstruction.fillColor);
  if (!renderinstruction.isStrokeTransparent()) {
    paintBack = UiPaint.stroke(
      color: renderinstruction.strokeColor,
      strokeWidth: renderinstruction.strokeWidth,
      cap: renderinstruction.strokeCap,
      join: renderinstruction.strokeJoin,
      strokeDasharray: renderinstruction.strokeDashArray,
    );
  }
  textPaint = UiTextPaint();
  textPaint.setFontFamily(renderinstruction.fontFamily);
  textPaint.setFontStyle(renderinstruction.fontStyle);
  textPaint.setTextSize(renderinstruction.fontSize);
}