Examples of drawString()


Examples of net.minecraft.client.gui.FontRenderer.drawString()

               
                offsetY = (realHeight - requiredHeight) / 2;
                offsetX = (realWidth - maxWidth) / 2 + 2 + 5;
               
                GL11.glDisable(GL11.GL_LIGHTING);
                fontRenderer.drawString(amperes, offsetX - realWidth / 2, 1 + offsetY - realHeight / 2 - 1 * lineHeight, 1);
                fontRenderer.drawString(voltage, offsetX - realWidth / 2, 1 + offsetY - realHeight / 2 + 0 * lineHeight, 1);
                fontRenderer.drawString(watt, offsetX - realWidth / 2, 1 + offsetY - realHeight / 2 + 1 * lineHeight, 1);
               
                GL11.glEnable(GL11.GL_LIGHTING);
                GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
View Full Code Here

Examples of net.minecraft.src.FontRenderer.drawString()

        x += 2 + w;
      }
    }
    FontRenderer font = SpoutClient.getHandle().fontRenderer;
    font.drawString(lwi.getTitle(), x + 2, y + 2, new Color(1.0F, 1.0F, 1.0F).toInt());
    font.drawString(lwi.getText(), x + 2, y + 2 + 8, new Color(0.8F, 0.8F, 0.8F).toInt());
  }

  private void scissorWidget(Widget widget) {
    double x = widget.getActualX() + widget.getWidth(), y = widget.getActualY() + widget.getHeight(), width = widget.getWidth(), height = widget.getHeight();
    double screenHeight;
View Full Code Here

Examples of org.antlr.works.visualization.graphics.GContext.drawString()

    public static void draw(GNode node) {
        GContext context = node.getContext();
        context.setColor(context.nodeColor);
        float r = context.getPixelNodeWidth()/2;
        context.drawCircle(node.getX()+r, node.getY(), r, true);
        context.drawString(context.getBoxFont(), node.state.toString(), node.getX()+r, node.getY(), GContext.ALIGN_CENTER);
    }

    public static boolean nodeContainsPoint(GNode node, Point p) {
        float nr = node.getContext().getPixelNodeWidth()/2;
        double r = Math.sqrt(Math.pow(p.x-node.getX()-nr, 2)+Math.pow(p.y-node.getY(), 2));
View Full Code Here

Examples of org.apache.fop.svg.PDFDocumentGraphics2D.drawString()

        //Some text
        g2d.rotate(-0.25);
        g2d.setColor(Color.RED);
        g2d.setFont(new Font("sans-serif", Font.PLAIN, 36));
        g2d.drawString("Hello world!", 140, 140);
        g2d.setColor(Color.RED.darker());
        g2d.setFont(new Font("serif", Font.PLAIN, 36));
        g2d.drawString("Hello world!", 140, 180);

        g2d.nextPage(); //Move to next page
View Full Code Here

Examples of org.apache.pdfbox.pdmodel.edit.PDPageContentStream.drawString()

                    {
                        throw new IOException( "Error:Expected non-null content stream." );
                    }
                    contentStream.moveTextPositionByAmount( 0, -height);
                    y -= height;
                    contentStream.drawString( nextLineToDraw.toString() );
                }


            }
View Full Code Here

Examples of org.apache.pdfbox.pdmodel.font.PDFont.drawString()

            at.scale(fontMatrix.getValue(0, 0) * 1000f, fontMatrix.getValue(1, 1) * 1000f);
            //TODO setClip() is a massive performance hot spot. Investigate optimization possibilities
            graphics.setClip(graphicsState.getCurrentClippingPath());
            // the fontSize is no longer needed as it is already part of the transformation
            // we should remove it from the parameter list in the long run
            font.drawString( text.getCharacter(), text.getCodePoints(), graphics, 1, at, x, y );
        }
        catch( IOException io )
        {
            io.printStackTrace();
        }
View Full Code Here

Examples of org.apache.xmlgraphics.java2d.ps.EPSDocumentGraphics2D.drawString()

           
            //Some text
            g2d.rotate(-0.25);
            g2d.setColor(Color.RED);
            g2d.setFont(new Font("sans-serif", Font.PLAIN, 36));
            g2d.drawString("Hello world!", 140, 140);
            g2d.setColor(Color.RED.darker());
            g2d.setFont(new Font("serif", Font.PLAIN, 36));
            g2d.drawString("Hello world!", 140, 180);
           
            //Cleanup
View Full Code Here

Examples of org.eclipse.swt.graphics.GC.drawString()

     
      int boxNum = 1;
      gc.setForeground(Colors.colorError);
      gc.setBackground(Colors.background);
      gc.drawRectangle(t.x(maxBoxOffsetX),t.y(maxBoxOffsetY*boxNum),maxBoxWidth,charHeight);
      gc.drawString(boxContent[boxNum-1],t.x(maxBoxOffsetX-5),t.y(maxBoxOffsetY*boxNum),true);
     
      boxNum++;
      gc.setForeground(Colors.green);
      gc.setBackground(Colors.background);
      gc.drawRectangle(t.x(maxBoxOffsetX),t.y(maxBoxOffsetY*boxNum),maxBoxWidth,charHeight);
 
View Full Code Here

Examples of org.eclipse.swt.graphics.GC.drawString()

     
      boxNum++;
      gc.setForeground(Colors.green);
      gc.setBackground(Colors.background);
      gc.drawRectangle(t.x(maxBoxOffsetX),t.y(maxBoxOffsetY*boxNum),maxBoxWidth,charHeight);
      gc.drawString(boxContent[boxNum-1],t.x(maxBoxOffsetX-5),t.y(maxBoxOffsetY*boxNum),true);
     
      boxNum++;
      gc.setForeground(Colors.blues[Colors.BLUES_DARKEST]);
      gc.drawRectangle(t.x(maxBoxOffsetX),t.y(maxBoxOffsetY*boxNum),maxBoxWidth,charHeight);
      gc.drawString(boxContent[boxNum-1],t.x(maxBoxOffsetX-5),t.y(maxBoxOffsetY*boxNum),true);
 
View Full Code Here

Examples of org.eclipse.swt.graphics.GC.drawString()

      gc.drawString(boxContent[boxNum-1],t.x(maxBoxOffsetX-5),t.y(maxBoxOffsetY*boxNum),true);
     
      boxNum++;
      gc.setForeground(Colors.blues[Colors.BLUES_DARKEST]);
      gc.drawRectangle(t.x(maxBoxOffsetX),t.y(maxBoxOffsetY*boxNum),maxBoxWidth,charHeight);
      gc.drawString(boxContent[boxNum-1],t.x(maxBoxOffsetX-5),t.y(maxBoxOffsetY*boxNum),true);
     
      boxNum++;
      gc.setForeground(Colors.blue);
      gc.drawRectangle(t.x(maxBoxOffsetX),t.y(maxBoxOffsetY*boxNum),maxBoxWidth,charHeight);
      gc.drawString(boxContent[boxNum-1],t.x(maxBoxOffsetX-5),t.y(maxBoxOffsetY*boxNum),true);
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.