java.awt.font.GlyphVector Java Examples

The following examples show how to use java.awt.font.GlyphVector. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PathGraphics.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
private boolean samePositions(GlyphVector gv, int[] gvcodes,
                              int[] origCodes, float[] origPositions) {

    int numGlyphs = gv.getNumGlyphs();
    float[] gvpos = gv.getGlyphPositions(0, numGlyphs, null);

    /* this shouldn't happen here, but just in case */
    if (numGlyphs != gvcodes.length ||  /* real paranoia here */
        origCodes.length != gvcodes.length ||
        origPositions.length != gvpos.length) {
        return false;
    }

    for (int i=0; i<numGlyphs; i++) {
        if (gvcodes[i] != origCodes[i] || gvpos[i] != origPositions[i]) {
            return false;
        }
    }
    return true;
}
 
Example #2
Source File: PathGraphics.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
private boolean samePositions(GlyphVector gv, int[] gvcodes,
                              int[] origCodes, float[] origPositions) {

    int numGlyphs = gv.getNumGlyphs();
    float[] gvpos = gv.getGlyphPositions(0, numGlyphs, null);

    /* this shouldn't happen here, but just in case */
    if (numGlyphs != gvcodes.length ||  /* real paranoia here */
        origCodes.length != gvcodes.length ||
        origPositions.length != gvpos.length) {
        return false;
    }

    for (int i=0; i<numGlyphs; i++) {
        if (gvcodes[i] != origCodes[i] || gvpos[i] != origPositions[i]) {
            return false;
        }
    }
    return true;
}
 
Example #3
Source File: SimplePieceSetter.java    From han3_ji7_tsoo1_kian3 with GNU Affero General Public License v3.0 6 votes vote down vote up
@Override
public PieceMovableTypeWen setWen(ChineseCharacterMovableTypeTzu parent,
		NonFinalCharComponent chineseCharacterWen)
{
	SeprateMovabletype rectangularArea = null;
	if (font.canDisplay(chineseCharacterWen.Unicode編號()))
	{
		GlyphVector glyphVector = font.createGlyphVector(fontRenderContext,
				chineseCharacterWen.部件組字式());
		rectangularArea = new SeprateMovabletype(new PlaneGeometry(glyphVector.getOutline()));
		rectangularArea.設字範圍(tzuModelTerritory);
		rectangularArea.設目標範圍(rectangularArea.這馬字範圍());
	}
	else
	{
		rectangularArea = findWenForNoBuiltIn(chineseCharacterWen);
	}
	rectangularArea.徙轉原點();

	PieceMovableTypeWen pieceMovableTypeWen = new PieceMovableTypeWen(
			parent, chineseCharacterWen, rectangularArea);
	return pieceMovableTypeWen;
}
 
Example #4
Source File: X11TextRenderer.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
public void drawGlyphVector(SunGraphics2D sg2d, GlyphVector g,
                            float x, float y)
{
    FontRenderContext frc = g.getFontRenderContext();
    FontInfo info = sg2d.getGVFontInfo(g.getFont(), frc);
    switch (info.aaHint) {
    case SunHints.INTVAL_TEXT_ANTIALIAS_OFF:
        super.drawGlyphVector(sg2d, g, x, y);
        return;
    case SunHints.INTVAL_TEXT_ANTIALIAS_ON:
         sg2d.surfaceData.aaTextRenderer.drawGlyphVector(sg2d, g, x, y);
        return;
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_HRGB:
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_VRGB:
         sg2d.surfaceData.lcdTextRenderer.drawGlyphVector(sg2d, g, x, y);
        return;
    default:
    }
}
 
Example #5
Source File: SunGraphics2D.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public void drawGlyphVector(GlyphVector gv, float x, float y)
{
    if (gv == null) {
        throw new NullPointerException("GlyphVector is null");
    }

    try {
        textpipe.drawGlyphVector(this, gv, x, y);
    } catch (InvalidPipeException e) {
        try {
            revalidateAll();
            textpipe.drawGlyphVector(this, gv, x, y);
        } catch (InvalidPipeException e2) {
            // Still catching the exception; we are not yet ready to
            // validate the surfaceData correctly.  Fail for now and
            // try again next time around.
        }
    } finally {
        surfaceData.markDirty();
    }
}
 
Example #6
Source File: HelvLtOblTest.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
BufferedImage drawText(boolean doGV) {
    int w = 400;
    int h = 50;
    BufferedImage bi = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
    Graphics2D g = bi.createGraphics();
    g.setColor(Color.white);
    g.fillRect(0,0,w,h);
    g.setColor(Color.black);
    Font f = helvFont.deriveFont(Font.PLAIN, 40);
    g.setFont(f);
    int x = 5;
    int y = h - 10;
    if (doGV) {
        FontRenderContext frc = new FontRenderContext(null, true, true);
        GlyphVector gv = f.createGlyphVector(frc, codes);
        g.drawGlyphVector(gv, 5, y);
   } else {
       g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
                          RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
       g.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS,
                          RenderingHints.VALUE_FRACTIONALMETRICS_ON);
       g.drawString(str, x, y);
   }
   return bi;
}
 
Example #7
Source File: HelvLtOblTest.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
BufferedImage drawText(boolean doGV) {
    int w = 400;
    int h = 50;
    BufferedImage bi = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
    Graphics2D g = bi.createGraphics();
    g.setColor(Color.white);
    g.fillRect(0,0,w,h);
    g.setColor(Color.black);
    Font f = helvFont.deriveFont(Font.PLAIN, 40);
    g.setFont(f);
    int x = 5;
    int y = h - 10;
    if (doGV) {
        FontRenderContext frc = new FontRenderContext(null, true, true);
        GlyphVector gv = f.createGlyphVector(frc, codes);
        g.drawGlyphVector(gv, 5, y);
   } else {
       g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
                          RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
       g.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS,
                          RenderingHints.VALUE_FRACTIONALMETRICS_ON);
       g.drawString(str, x, y);
   }
   return bi;
}
 
Example #8
Source File: SunGraphics2D.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public void drawGlyphVector(GlyphVector gv, float x, float y)
{
    if (gv == null) {
        throw new NullPointerException("GlyphVector is null");
    }

    try {
        textpipe.drawGlyphVector(this, gv, x, y);
    } catch (InvalidPipeException e) {
        try {
            revalidateAll();
            textpipe.drawGlyphVector(this, gv, x, y);
        } catch (InvalidPipeException e2) {
            // Still catching the exception; we are not yet ready to
            // validate the surfaceData correctly.  Fail for now and
            // try again next time around.
        }
    } finally {
        surfaceData.markDirty();
    }
}
 
Example #9
Source File: GlyphListPipe.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
public void drawGlyphVector(SunGraphics2D sg2d, GlyphVector gv,
                            float x, float y)
{
    FontRenderContext frc = gv.getFontRenderContext();
    FontInfo info = sg2d.getGVFontInfo(gv.getFont(), frc);
    if (info.pixelHeight > OutlineTextRenderer.THRESHHOLD) {
        SurfaceData.outlineTextRenderer.drawGlyphVector(sg2d, gv, x, y);
        return;
    }
    if (sg2d.transformState >= SunGraphics2D.TRANSFORM_TRANSLATESCALE) {
        double origin[] = {x, y};
        sg2d.transform.transform(origin, 0, origin, 0, 1);
        x = (float) origin[0];
        y = (float) origin[1];
    } else {
        x += sg2d.transX; // don't use the glyph info origin, already in gv.
        y += sg2d.transY;
    }

    GlyphList gl = GlyphList.getInstance();
    gl.setFromGlyphVector(info, gv, x, y);
    drawGlyphList(sg2d, gl, info.aaHint);
    gl.dispose();
}
 
Example #10
Source File: X11TextRenderer.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public void drawGlyphVector(SunGraphics2D sg2d, GlyphVector g,
                            float x, float y)
{
    FontRenderContext frc = g.getFontRenderContext();
    FontInfo info = sg2d.getGVFontInfo(g.getFont(), frc);
    switch (info.aaHint) {
    case SunHints.INTVAL_TEXT_ANTIALIAS_OFF:
        super.drawGlyphVector(sg2d, g, x, y);
        return;
    case SunHints.INTVAL_TEXT_ANTIALIAS_ON:
         sg2d.surfaceData.aaTextRenderer.drawGlyphVector(sg2d, g, x, y);
        return;
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_HRGB:
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_VRGB:
         sg2d.surfaceData.lcdTextRenderer.drawGlyphVector(sg2d, g, x, y);
        return;
    default:
    }
}
 
Example #11
Source File: TextMeasureTests.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
public void runTest(Object ctx, int numReps) {
    GVContext gvctx = (GVContext)ctx;
    GlyphVector gv = gvctx.gv;
    Rectangle2D r;
    do {
        r = gv.getVisualBounds();
    } while (--numReps >= 0);
}
 
Example #12
Source File: TextConstructionTests.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public void runTest(Object ctx, int numReps) {
    TCContext tcctx = (TCContext)ctx;
    final Font font = tcctx.font;
    final int[] glyphs = tcctx.glyphs;
    final FontRenderContext frc = tcctx.frc;
    GlyphVector gv;
    do {
        gv = font.createGlyphVector(frc, glyphs);
    } while (--numReps >= 0);
}
 
Example #13
Source File: TextConstructionTests.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public void runTest(Object ctx, int numReps) {
    TCContext tcctx = (TCContext)ctx;
    final Font font = tcctx.font;
    final int[] glyphs = tcctx.glyphs;
    final FontRenderContext frc = tcctx.frc;
    GlyphVector gv;
    do {
        gv = font.createGlyphVector(frc, glyphs);
    } while (--numReps >= 0);
}
 
Example #14
Source File: ShapeInfo.java    From mil-sym-java with Apache License 2.0 5 votes vote down vote up
public void setGlyphVector(GlyphVector value, Point2D position)
{
    _GlyphVector = value;
    _Position = position;
    _Shape = null;
    _TextLayout = null;
}
 
Example #15
Source File: TextConstructionTests.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public void runTest(Object ctx, int numReps) {
    TCContext tcctx = (TCContext)ctx;
    final Font font = tcctx.font;
    final char[] chars = tcctx.chars;
    final FontRenderContext frc = tcctx.frc;
    GlyphVector gv;
    do {
        gv = font.createGlyphVector(frc, chars);
    } while (--numReps >= 0);
}
 
Example #16
Source File: TextRenderTests.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
public void runTest(Object ctx, int numReps) {
    GVContext gvctx = (GVContext)ctx;
    Graphics2D g2d = gvctx.g2d;
    GlyphVector gv = gvctx.gv;
    do {
        g2d.drawGlyphVector(gv, 40, 40);
    } while (--numReps >= 0);
}
 
Example #17
Source File: TextMeasureTests.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public void runTest(Object ctx, int numReps) {
    GVContext gvctx = (GVContext)ctx;
    GlyphVector gv = gvctx.gv;
    GlyphMetrics gm;
    do {
        for (int i = 0, e = gv.getNumGlyphs(); i < e; ++i) {
            gm = gv.getGlyphMetrics(i);
        }
    } while (--numReps >= 0);
}
 
Example #18
Source File: TextMeasureTests.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
public void runTest(Object ctx, int numReps) {
    GVContext gvctx = (GVContext)ctx;
    GlyphVector gv = gvctx.gv;
    GlyphMetrics gm;
    do {
        for (int i = 0, e = gv.getNumGlyphs(); i < e; ++i) {
            gm = gv.getGlyphMetrics(i);
        }
    } while (--numReps >= 0);
}
 
Example #19
Source File: GlyphListPipe.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
public void drawGlyphVector(SunGraphics2D sg2d, GlyphVector gv,
                            float x, float y)
{
    FontRenderContext frc = gv.getFontRenderContext();
    FontInfo info = sg2d.getGVFontInfo(gv.getFont(), frc);
    if (info.pixelHeight > OutlineTextRenderer.THRESHHOLD) {
        SurfaceData.outlineTextRenderer.drawGlyphVector(sg2d, gv, x, y);
        return;
    }
    if (sg2d.transformState >= SunGraphics2D.TRANSFORM_TRANSLATESCALE) {
        double origin[] = {x, y};
        sg2d.transform.transform(origin, 0, origin, 0, 1);
        x = (float) origin[0];
        y = (float) origin[1];
    } else {
        x += sg2d.transX; // don't use the glyph info origin, already in gv.
        y += sg2d.transY;
    }

    GlyphList gl = GlyphList.getInstance();
    gl.setFromGlyphVector(info, gv, x, y);
    drawGlyphList(sg2d, gl, info.aaHint);
    gl.dispose();
}
 
Example #20
Source File: StandardGlyphVector.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Utility used by getStandardGV.
 * Constructs a StandardGlyphVector from a generic glyph vector.
 * Do not call this from new contexts without considering the comment
 * about "userGlyphs".
 */
private StandardGlyphVector(GlyphVector gv, FontRenderContext frc) {
    this.font = gv.getFont();
    this.frc = frc;
    initFontData();

    int nGlyphs = gv.getNumGlyphs();
    this.userGlyphs = gv.getGlyphCodes(0, nGlyphs, null);
    if (gv instanceof StandardGlyphVector) {
        /* userGlyphs will be OK because this is a private constructor
         * and the returned instance is used only for rendering.
         * It's not constructable by user code, nor returned to the
         * application. So we know "userGlyphs" are valid as having
         * been either already validated or are the result of layout.
         */
        this.glyphs = userGlyphs;
    } else {
        this.glyphs = getValidatedGlyphs(this.userGlyphs);
    }
    this.flags = gv.getLayoutFlags() & FLAG_MASK;

    if ((flags & FLAG_HAS_POSITION_ADJUSTMENTS) != 0) {
        this.positions = gv.getGlyphPositions(0, nGlyphs + 1, null);
    }

    if ((flags & FLAG_COMPLEX_GLYPHS) != 0) {
        this.charIndices = gv.getGlyphCharIndices(0, nGlyphs, null);
    }

    if ((flags & FLAG_HAS_TRANSFORMS) != 0) {
        AffineTransform[] txs = new AffineTransform[nGlyphs]; // worst case
        for (int i = 0; i < nGlyphs; ++i) {
            txs[i] = gv.getGlyphTransform(i); // gv doesn't have getGlyphsTransforms
        }

        setGlyphTransforms(txs);
    }
}
 
Example #21
Source File: TextMeasureTests.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
public void runTest(Object ctx, int numReps) {
    GVContext gvctx = (GVContext)ctx;
    GlyphVector gv = gvctx.gv;
    Rectangle2D r;
    do {
        r = gv.getLogicalBounds();
    } while (--numReps >= 0);
}
 
Example #22
Source File: TextSourceLabel.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
public TextSourceLabel(TextSource source, Rectangle2D lb, Rectangle2D ab, GlyphVector gv) {
  this.source = source;

  this.lb = lb;
  this.ab = ab;
  this.gv = gv;
}
 
Example #23
Source File: TextMeasureTests.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public void runTest(Object ctx, int numReps) {
    GVContext gvctx = (GVContext)ctx;
    GlyphVector gv = gvctx.gv;
    Shape s;
    do {
        s = gv.getOutline();
    } while (--numReps >= 0);
}
 
Example #24
Source File: StandardGlyphVector.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Utility used by getStandardGV.
 * Constructs a StandardGlyphVector from a generic glyph vector.
 * Do not call this from new contexts without considering the comment
 * about "userGlyphs".
 */
private StandardGlyphVector(GlyphVector gv, FontRenderContext frc) {
    this.font = gv.getFont();
    this.frc = frc;
    initFontData();

    int nGlyphs = gv.getNumGlyphs();
    this.userGlyphs = gv.getGlyphCodes(0, nGlyphs, null);
    if (gv instanceof StandardGlyphVector) {
        /* userGlyphs will be OK because this is a private constructor
         * and the returned instance is used only for rendering.
         * It's not constructable by user code, nor returned to the
         * application. So we know "userGlyphs" are valid as having
         * been either already validated or are the result of layout.
         */
        this.glyphs = userGlyphs;
    } else {
        this.glyphs = getValidatedGlyphs(this.userGlyphs);
    }
    this.flags = gv.getLayoutFlags() & FLAG_MASK;

    if ((flags & FLAG_HAS_POSITION_ADJUSTMENTS) != 0) {
        this.positions = gv.getGlyphPositions(0, nGlyphs + 1, null);
    }

    if ((flags & FLAG_COMPLEX_GLYPHS) != 0) {
        this.charIndices = gv.getGlyphCharIndices(0, nGlyphs, null);
    }

    if ((flags & FLAG_HAS_TRANSFORMS) != 0) {
        AffineTransform[] txs = new AffineTransform[nGlyphs]; // worst case
        for (int i = 0; i < nGlyphs; ++i) {
            txs[i] = gv.getGlyphTransform(i); // gv doesn't have getGlyphsTransforms
        }

        setGlyphTransforms(txs);
    }
}
 
Example #25
Source File: TextConstructionTests.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public void runTest(Object ctx, int numReps) {
    TCContext tcctx = (TCContext)ctx;
    final Font font = tcctx.font;
    final char[] chars = tcctx.chars1;
    final int start = 1;
    final int limit = chars.length - 1;
    final FontRenderContext frc = tcctx.frc;
    final int flags = tcctx.flags;
    GlyphVector gv;
    do {
        gv = font.layoutGlyphVector(frc, chars, start, limit, flags);
    } while (--numReps >= 0);
}
 
Example #26
Source File: StandardGlyphVector.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Utility used by getStandardGV.
 * Constructs a StandardGlyphVector from a generic glyph vector.
 * Do not call this from new contexts without considering the comment
 * about "userGlyphs".
 */
private StandardGlyphVector(GlyphVector gv, FontRenderContext frc) {
    this.font = gv.getFont();
    this.frc = frc;
    initFontData();

    int nGlyphs = gv.getNumGlyphs();
    this.userGlyphs = gv.getGlyphCodes(0, nGlyphs, null);
    if (gv instanceof StandardGlyphVector) {
        /* userGlyphs will be OK because this is a private constructor
         * and the returned instance is used only for rendering.
         * It's not constructable by user code, nor returned to the
         * application. So we know "userGlyphs" are valid as having
         * been either already validated or are the result of layout.
         */
        this.glyphs = userGlyphs;
    } else {
        this.glyphs = getValidatedGlyphs(this.userGlyphs);
    }
    this.flags = gv.getLayoutFlags() & FLAG_MASK;

    if ((flags & FLAG_HAS_POSITION_ADJUSTMENTS) != 0) {
        this.positions = gv.getGlyphPositions(0, nGlyphs + 1, null);
    }

    if ((flags & FLAG_COMPLEX_GLYPHS) != 0) {
        this.charIndices = gv.getGlyphCharIndices(0, nGlyphs, null);
    }

    if ((flags & FLAG_HAS_TRANSFORMS) != 0) {
        AffineTransform[] txs = new AffineTransform[nGlyphs]; // worst case
        for (int i = 0; i < nGlyphs; ++i) {
            txs[i] = gv.getGlyphTransform(i); // gv doesn't have getGlyphsTransforms
        }

        setGlyphTransforms(txs);
    }
}
 
Example #27
Source File: TranslatedOutlineTest.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
public static void main(String a[]) {
    /* prepare blank image */
    BufferedImage bi = new BufferedImage(50, 50, BufferedImage.TYPE_INT_RGB);
    Graphics2D g2 = (Graphics2D) bi.getGraphics();
    g2.setColor(Color.WHITE);
    g2.fillRect(0, 0, 50, 50);

    /* draw outline somethere in the middle of the image */
    FontRenderContext frc = new FontRenderContext(null, false, false);
    g2.setColor(Color.RED);
    g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
    GlyphVector gv = g2.getFont().createGlyphVector(frc, "test");
    g2.fill(gv.getOutline(20, 20));

    /* Check if anything was drawn.
     * If y direction is not correct then image is still blank and
     * test will fail.
     */
    int bgcolor = Color.WHITE.getRGB();
    for (int i=0; i<bi.getWidth(); i++) {
        for(int j=0; j<bi.getHeight(); j++) {
           if (bi.getRGB(i, j) != bgcolor) {
               System.out.println("Test passed.");
               return;
           }
        }
    }
    throw new RuntimeException("Outline was not detected");
}
 
Example #28
Source File: TextConstructionTests.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public void runTest(Object ctx, int numReps) {
    TCContext tcctx = (TCContext)ctx;
    final Font font = tcctx.font;
    final char[] chars = tcctx.chars;
    final FontRenderContext frc = tcctx.frc;
    GlyphVector gv;
    do {
        gv = font.createGlyphVector(frc, chars);
    } while (--numReps >= 0);
}
 
Example #29
Source File: TextConstructionTests.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public void runTest(Object ctx, int numReps) {
    TCContext tcctx = (TCContext)ctx;
    final Font font = tcctx.font;
    final CharacterIterator ci = tcctx.ci;
    final FontRenderContext frc = tcctx.frc;
    GlyphVector gv;
    do {
        gv = font.createGlyphVector(frc, ci);
    } while (--numReps >= 0);
}
 
Example #30
Source File: TextMeasureTests.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public void runTest(Object ctx, int numReps) {
    GVContext gvctx = (GVContext)ctx;
    GlyphVector gv = gvctx.gv;
    Rectangle2D r;
    do {
        for (int i = 0, e = gv.getNumGlyphs(); i < e; ++i) {
            r = gv.getGlyphPixelBounds(i, null, 0, 0); // !!! add opt to provide different frc?
        }
    } while (--numReps >= 0);
}