Package com.google.code.appengine.awt.font

Examples of com.google.code.appengine.awt.font.FontRenderContext


     * @return current font render context
     */
    public FontRenderContext getFontRenderContext() {
        // NOTE: not sure?
        // Fixed for VG-285
        return new FontRenderContext(new AffineTransform(1, 0, 0, 1, 0, 0),
                true, true);
    }
View Full Code Here


     * @return GlyphVector using a default rendering context
     */
    private SVGGlyph createGlyph(int c, Font font) {
        GlyphVector glyphVector = font.createGlyphVector(
            // flipping is done by SVGGlyph
            new FontRenderContext(null, true, true),
            // unicode to char
            String.valueOf((char) c));

        // create and store the SVG Glyph
        return new SVGGlyph(
View Full Code Here

            // the size of the design grid on which glyphs are laid out
            result.append("units-per-em=\"");
            result.append(SVGGraphics2D.fixedPrecision(SVGGlyph.FONT_SIZE));
            result.append("\" ");

            TextLayout tl = new TextLayout("By", font, new FontRenderContext(new AffineTransform(), true, true));

            // The maximum unaccented height of the font within the font coordinate system.
            // If the attribute is not specified, the effect is as if the attribute were set
            // to the difference between the units-per-em value and the vert-origin-y value
            // for the corresponding font.
View Full Code Here

        // The substitute code attempts to work around this by using defensive
        // programming
        // See code marked FONTHACK elsewhere in this file
        // Create a GlyphVector for this single character.
        FontRenderContext orig = getContext();
        FontRenderContext frc = new FontRenderContext(null, orig
                .isAntiAliased(), orig.usesFractionalMetrics());
        Shape shape = font.createGlyphVector(frc, new char[] { getUnicode(i) })
                .getGlyphOutline(0);
        return orig.getTransform().createTransformedShape(shape);
    }
View Full Code Here


    Graphics2D g2d = super.getGraphics2D();


    FontRenderContext fontRenderContext = g2d.getFontRenderContext();


    //---cache calcs used more than once
    float edgePaddingTimesTwo = super.getChartProperties().getEdgePadding() * 2;

 
View Full Code Here

   *
   ************************************************************************************************/
  protected void renderChart()
  {
    PieChart2DProperties properties = (PieChart2DProperties) this.iPieChartDataSet.getChartTypeProperties();
    FontRenderContext fontRenderContext = super.getGraphics2D().getFontRenderContext();

    this.pieChartDataProcessor = new PieChartDataProcessor( this.iPieChartDataSet );
    this.pieChartDataProcessor.processData();


View Full Code Here

   *
   ************************************************************************************************/
  protected void renderChart()
  {
    PieChart3DProperties properties = (PieChart3DProperties) this.iPieChartDataSet.getChartTypeProperties();
    FontRenderContext fontRenderContext = super.getGraphics2D().getFontRenderContext();

    this.pieChartDataProcessor = new PieChartDataProcessor( this.iPieChartDataSet );
    this.pieChartDataProcessor.processData();


View Full Code Here

    g2d.setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON );


//todo : render legend, use scale processor classes,...

    FontRenderContext fontRenderContext = super.getGraphics2D().
      getFontRenderContext();

    //---render the TITLE. If no title, this will return zero.
    float chartTitleHeight = super.renderChartTitle( this.iRadarChartDataSet.
                                     getChartTitle(), fontRenderContext );
View Full Code Here

     * @param context the specified Graphics context
     *
     * @return a FontRenderContext of the specified Graphics context.
     */
    private FontRenderContext getFRCFromGraphics(Graphics context){
        FontRenderContext frc;
        if (context instanceof Graphics2D) {
            frc = ((Graphics2D)context).getFontRenderContext();
        } else {
            frc = new FontRenderContext(null, false, false);
        }

        return frc;

    }
View Full Code Here

                getRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING));
        boolean usesFractionalMetrics = RenderingHints.VALUE_FRACTIONALMETRICS_ON.equals(
                getRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS));


        return new FontRenderContext(new AffineTransform(), isAntiAliased, usesFractionalMetrics);
    }
View Full Code Here

TOP

Related Classes of com.google.code.appengine.awt.font.FontRenderContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.