Skip to content

Commit

Permalink
Make (begin/end)Text() final in GlyphRunTextOutput
Browse files Browse the repository at this point in the history
  • Loading branch information
weisJ committed Sep 17, 2024
1 parent 1ed5aac commit ba641b9
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ public abstract class GlyphRunTextOutput implements TextOutput {
protected abstract void glyphRun(@NotNull String codepoints, @NotNull AffineTransform glyphTransform,
@NotNull RenderContext context);

protected abstract void onTextStart();

protected abstract void onTextEnd();

@Override
public void codepoint(@NotNull String codepoint, @NotNull AffineTransform glyphTransform,
@NotNull RenderContext context) {
Expand All @@ -57,8 +61,9 @@ private void reset() {
}

@Override
public void beginText() {
public final void beginText() {
reset();
onTextStart();
}

@Override
Expand All @@ -71,7 +76,8 @@ public void glyphRunBreak() {
}

@Override
public void endText() {
public final void endText() {
glyphRunBreak();
onTextEnd();
}
}

0 comments on commit ba641b9

Please # to comment.