Package java.awt

Examples of java.awt.Graphics2D.draw()


            g2d.translate(dx, dy);
            g2d.scale(r, r);
            g2d.setColor(Color.WHITE);
            g2d.fill(rc);
            g2d.setColor(Color.BLACK);
            g2d.draw(rc);
            rc = format == null
                    ? pageLayout.getDrawableArea(Unit.PT)
                    : pageLayout.getDrawableArea(format);
            page.draw(g2d, rc.getX(), rc.getY(), rc.getHeight());
        }
View Full Code Here


        Graphics2D myGraphics =(Graphics2D)(g.create());
        myGraphics.setColor(selectionColor);
        myGraphics.fill(selection);
        myGraphics.setStroke(myStroke);
        myGraphics.setColor(strokeColor);
        myGraphics.draw(selection);
        myGraphics.dispose();
      }
     
      public void setMaxSelection(Rectangle r){
        maxWidth=r.width;
View Full Code Here

                                textAt.translate( x, y);
                                textAt.rotate(Math.toRadians(270));
                                textAt.translate(0, height);
                                Shape shape = layout.getOutline(textAt);
                                gp.append( at.createTransformedShape( shape )/*layout.getOutline( null ))*/, false );
                                g2.draw( shape );
                            }
                            else
                                g.drawString( sr.text, x, y );
                        }
                    catch ( Exception e )
View Full Code Here

                                _startX = endX;
                                _startY = endY;
                            }
                                //gp.closePath();
                            g2.setStroke( solid );
                            g2.draw( gp );
                        }
                    catch ( Exception e ) {
                        System.out.println( "Unable to draw static text as a 2D graphics context is required" );
                    }
                    break;
View Full Code Here

                g2d.setXORMode(Color.white);
                g2d.setColor(Color.black);
                g2d.setStroke(markerStroke);

                g2d.draw(markerTop);
                g2d.draw(markerLeft);
                g2d.draw(markerBottom);
                g2d.draw(markerRight);
            }
        }
View Full Code Here

                g2d.setXORMode(Color.white);
                g2d.setColor(Color.black);
                g2d.setStroke(markerStroke);

                g2d.draw(markerTop);
                g2d.draw(markerLeft);
                g2d.draw(markerBottom);
                g2d.draw(markerRight);
            }
        }
    }
View Full Code Here

                g2d.setColor(Color.black);
                g2d.setStroke(markerStroke);

                g2d.draw(markerTop);
                g2d.draw(markerLeft);
                g2d.draw(markerBottom);
                g2d.draw(markerRight);
            }
        }
    }
}
View Full Code Here

                g2d.setStroke(markerStroke);

                g2d.draw(markerTop);
                g2d.draw(markerLeft);
                g2d.draw(markerBottom);
                g2d.draw(markerRight);
            }
        }
    }
}
View Full Code Here

        g2d.setColor(selectionOverlayColor);
        g2d.fill(s);
        if (selectionOverlayStrokeColor != null) {
      g2d.setStroke(new java.awt.BasicStroke(1.0f));
      g2d.setColor(selectionOverlayStrokeColor);
      g2d.draw(s);
        }
    }
            }
        }
    }
View Full Code Here

                                textAt.translate( x, y);
                                textAt.rotate(Math.toRadians(270));
                                textAt.translate(0, height);
                                Shape shape = layout.getOutline(textAt);
                                gp.append( at.createTransformedShape( shape )/*layout.getOutline( null ))*/, false );
                                g2.draw( shape );
                            }
                            else
                                g.drawString( sr.text, x, y );
                        }
                    catch ( Exception 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.