Help me making letter
Hi, can anyone help me making letters, i have the example, but i need to make other letters , ex. O or V or L .
Here's the example of letter C :
public class SimpleLetterC extends Frame
public void paint(Graphics g)
Graphics2D g2d = (Graphics2D) g;
BasicStroke bs = new BasicStroke(3.0f);
int xc1 = 50;
int yc1 = 250;
int xc2 = 250;
int yc2 = 50;
int xc3 = 50;
int yc3 = 50;
int xc4 = 250;
int yc4 = 450;
int xc5 = 50;
int yc5 = 450;
QuadCurve2D.Double d1 = new QuadCurve2D.Double(xc1,yc1,xc3,yc3,xc2,yc2);
QuadCurve2D.Double d2 = new QuadCurve2D.Double(xc1,yc1,xc5,yc5,xc4,yc4);
public static void drawSmallRect(int x, int y, Graphics2D g2d)
Rectangle rect = new Rectangle(x-4,y-3,8,8);
public static void main(String argv)
SimpleLetterC f = new SimpleLetterC();
f.setTitle("The letter C");
It's probably best if you try to solve this yourself first as you'll gain much more by doing it this way. All that you need to know is present in the example code, you just have to modify it to your own ends.
hmmmm. It's very difficult, i'm trying this , no results .
Use a piece of grid paper to draw out the figure/letter you want to draw. That will give you the coordinates of each of the lines that you must draw to create the figure.