Examples of drawText()


Examples of com.day.image.Layer.drawText()

        }
        int width = Math.max((int) titleExtent.getWidth(), (int) subtitleExtent.getWidth());

        Layer text = new Layer(width, (int) titleExtent.getHeight() + 40, new Color(0x01ffffff, true));
        text.setPaint(titleColor);
        text.drawText(0, titleBase, 0, 0, title, titleFont, Font.ALIGN_LEFT | Font.ALIGN_BASE, 0, 0);
        text.resize(text.getWidth() / scale, text.getHeight() / scale);
        text.setX(0);
        text.setY(0);

        if (subtitle.length() > 0) {
View Full Code Here

Examples of com.day.image.Layer.drawText()

            }
            String txt = titles[i].toUpperCase();
            if (txt.length() > 0) {
                Rectangle2D extent = fonts[i].getTextExtent(0, 0, 0, 0, txt, Font.ALIGN_LEFT, 0, 0);
                text.setPaint(colors[i]);
                text.drawText(0, y, 0, 0, txt, fonts[i], Font.ALIGN_LEFT, 0, 0);
                y += extent.getHeight() + 4 * scale;
            }
        }
        text.resize(text.getWidth() / scale, text.getHeight() / scale);
        text.setY(paddingY);
View Full Code Here

Examples of com.day.image.Layer.drawText()

        text.setY(0);

        if (subtitle.length() > 0) {
            // draw the subtitle normal sized
            text.setPaint(subtitleColor);
            text.drawText(0, subTitleBase, 0, 0, subtitle, subTitleFont, Font.ALIGN_LEFT | Font.ALIGN_BASE, 0, 0);
        }

        // and merge the layers
        text.setY(paddingY);
        text.setX(paddingX);
View Full Code Here

Examples of net.rim.device.api.ui.Graphics.drawText()

            g.setColor(Color.ALICEBLUE);
            g.fillRoundRect(10, 10, displayWidth - ROUND_RECT_WIDTH_PAD,
                    displayHeight - ROUND_RECT_HEIGHT_PAD, ARC_WIDTH,
                    ARC_HEIGHT);
            g.setColor(Color.DARKGRAY);
            g.drawText(Integer.toString(i), displayWidth / 2, displayHeight / 2);

            final BitmapField field = new BitmapField(bitmap);
            manager.add(field);
        }
View Full Code Here

Examples of org.apache.fop.render.java2d.Java2DPainter.drawText()

                    g2d.draw(rect);
                }
                Java2DPainter painter = new Java2DPainter(g2d,
                        getContext(), parent.getFontInfo(), state);
                try {
                    painter.drawText(x, y, letterSpacing, wordSpacing, dx, text);
                } catch (IFException e) {
                    //This should never happen with the Java2DPainter
                    throw new RuntimeException("Unexpected error while painting text", e);
                }
            }
View Full Code Here

Examples of org.apache.fop.render.java2d.Java2DPainter.drawText()

                    g2d.draw(rect);
                }
                Java2DPainter painter = new Java2DPainter(g2d,
                        getContext(), parent.getFontInfo(), state);
                try {
                    painter.drawText(x, y, letterSpacing, wordSpacing, dp, text);
                } catch (IFException e) {
                    //This should never happen with the Java2DPainter
                    throw new RuntimeException("Unexpected error while painting text", e);
                }
            }
View Full Code Here

Examples of org.apache.isis.viewer.dnd.drawing.Canvas.drawText()

            }

            canvas.drawLine(0, 0, 0, getSize().getHeight() - 1, secondary1);
            canvas.drawLine(x, 0, x, getSize().getHeight() - 1, secondary1);
            final Canvas headerCanvas = canvas.createSubcanvas(x, 0, axis.getColumnWidth(i) - 1, height);
            headerCanvas.drawText(axis.getColumnName(i), ViewConstants.HPADDING, y, secondary1, Toolkit.getText(ColorsAndFonts.TEXT_LABEL));
            x += axis.getColumnWidth(i);
        }
        // Color secondary2 = Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY2);
        // canvas.drawLine(x, 0, x, getSize().getHeight() - 1, secondary2);
        // canvas.drawRectangle(0, height, getSize().getWidth() - 1,
View Full Code Here

Examples of org.apache.isis.viewer.dnd.drawing.Canvas.drawText()

            }

            canvas.drawLine(0, 0, 0, getSize().getHeight() - 1, secondary1);
            canvas.drawLine(x, 0, x, getSize().getHeight() - 1, secondary1);
            final Canvas headerCanvas = canvas.createSubcanvas(x, 0, axis.getColumnWidth(i) - 1, height);
            headerCanvas.drawText(axis.getColumnName(i), HPADDING, y, secondary1, Toolkit.getText(ColorsAndFonts.TEXT_LABEL));
            x += axis.getColumnWidth(i);
        }
        // Color secondary2 = Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY2);
        // canvas.drawLine(x, 0, x, getSize().getHeight() - 1, secondary2);
        // canvas.drawRectangle(0, height, getSize().getWidth() - 1,
View Full Code Here

Examples of org.apache.isis.viewer.dnd.drawing.Canvas.drawText()

            }

            canvas.drawLine(0, 0, 0, getSize().getHeight() - 1, secondary1);
            canvas.drawLine(x, 0, x, getSize().getHeight() - 1, secondary1);
            final Canvas headerCanvas = canvas.createSubcanvas(x, 0, axis.getColumnWidth(i) - 1, height);
            headerCanvas.drawText(axis.getColumnName(i), HPADDING, y, secondary1,
                Toolkit.getText(ColorsAndFonts.TEXT_LABEL));
            x += axis.getColumnWidth(i);
        }
        // Color secondary2 = Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY2);
        // canvas.drawLine(x, 0, x, getSize().getHeight() - 1, secondary2);
View Full Code Here

Examples of org.apache.xmlgraphics.java2d.Graphics2DImagePainter.drawText()

                    g2d.draw(rect);
                }
                Java2DPainter painter = new Java2DPainter(g2d,
                        getContext(), parent.getFontInfo(), state);
                try {
                    painter.drawText(x, y, letterSpacing, wordSpacing, dx, text);
                } catch (IFException e) {
                    //This should never happen with the Java2DPainter
                    throw new RuntimeException("Unexpected error while painting text", e);
                }
            }
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.