Без темы
<<  Drauen ist Bltterfall Ease of Access and Assistive Technology on Windows 7  >>
Drawing Lines Exercise
Drawing Lines Exercise
AWT Graphics Class
AWT Graphics Class
Draw Circle Exercise
Draw Circle Exercise
Add a String to a Picture Exercise
Add a String to a Picture Exercise
Drawing Lines Exercise
Drawing Lines Exercise
Картинки из презентации «Drawing in Java part» к уроку английского языка на тему «Без темы»

Автор: Barbara Jane Ericson. Чтобы познакомиться с картинкой полного размера, нажмите на её эскиз. Чтобы можно было использовать все картинки для урока английского языка, скачайте бесплатно презентацию «Drawing in Java part.ppt» со всеми картинками в zip-архиве размером 802 КБ.

Drawing in Java part

содержание презентации «Drawing in Java part.ppt»
Сл Текст Сл Текст
1Drawing in Java part 1. Barb Ericson 10gObj.drawOval(x,y,width, height)
Georgia Institute of Technology September gObj.fillOval(x,y,width, height) Give the
2006. Georgia Institute of Technology. x and y of the upper left corner of the
2Learning Goals. Understand at a enclosing rectangle Not a point on the
conceptual and practical level How to use circle or ellipse Give the width and
the Turtle class to draw on a picture How height of the enclosing rectangle To make
to use the java.awt.Graphics class to do a circle use the same value for the width
simple drawing How to draw simple shapes and height. x,y. height. width. Georgia
How to set the color How to set the font Institute of Technology.
How to draw strings. Georgia Institute of 11Draw Circle Exercise. Write a method
Technology. to add a yellow sun to a picture Test with
3Drawing on a Picture. What if we want beach.jpg String file =
to draw something on a picture? How about FileChooser.getMediaPath(“beach.jpg”);
drawing a grid of lines on top of a Picture p = new Picture(file);
picture? We could use a Turtle object to p.drawSun(); p.show(); Save the new image
draw the lines Create the Turtle on a with pictureObj.write(fileName); Georgia
Picture object Picture p = new Institute of Technology.
Picture(FileChooser.pickAFile()); Turtle 12Working with Fonts. Create a font
turtle1 = new Turtle(p); Using the object with the font name, style, and
methods: moveTo(x,y), penUp(), penDown(), point size Font labelFont = new
turnRight(), turnLeft(), turn(amount). Font(“TimesRoman”, Font.BOLD, 24); Font
Georgia Institute of Technology. normalFont = new
4Drawing Lines Exercise. Write a method Font(“Helvetica”,Font.PLAIN, 12); Set the
drawGrid in Picture.java to draw current font gObj.setFont(labelFont); Get
horizontal and vertical lines on the font information gObj.getStyle(),
current picture, using a Turtle Draw 3 g.getSize(), g.getName(), g.getFamily.
lines in x and 3 in y To test it: String Georgia Institute of Technology.
file = 13To draw a string
FileChooser.getMediaPath(“barbara.jpg”); gObj.drawString(“test”,leftX,baselineY);
Picture p = new Picture(file); Use FontMetrics class for drawing
p.drawGrid(); p.show(); Georgia Institute information FontMetrics currFontMetrics =
of Technology. g.getFontMetrics(); int baselineY =
5Drawing Other Shapes. How would you currFontMetrics.getHeight() -
draw a circle on a picture? How would you currFontMetrics.getDescent(); int width =
draw a string of characters? Java has a currFontMetrics.stringWidth(“test”); test
class that knows how to do these things string. Working with Strings. ascent.
Using a Graphics object It knows how to leading. leftX. height. baselineY.
draw and fill simple shapes and images You descent. Georgia Institute of Technology.
can draw on a picture object By getting 14Add a String to a Picture Exercise.
the graphics object from it Write a method drawString that will add
pictureObj.getGraphics(); Georgia some text to a picture Set the color to
Institute of Technology. draw with Set the font to use when drawing
6AWT Graphics Class. Methods of the the string Draw a string near the bottom
Graphics class in the java.awt package let left of the picture If you have time
you paint Pick a color to use Draw some create another method that takes a string
shapes Circles, Rectangles, Lines, and y value and centers the string in x
Polygons, Arcs Shapes drawn on top of Test with String file =
other shapes will cover them Set the font FileChooser.getMediaPath(“kitten2.jpg”);
to use Draw some letters (strings). Picture p = new Picture(file);
Georgia Institute of Technology. p.drawString(“Barbara Ericson”); p.show();
7Working with java.awt.Color. To create Georgia Institute of Technology.
a new color object new 15Drawing Lines and Polygons. Line
Color(redValue,greenValue,blueValue) There g.drawLine(x1,y1,x2,y2); Polygon Outlined
are predefined colors red, green, blue, Polygon
black, yellow, gray, magenta, cyan, pink, gObj.drawPolygon(xArray,yArray,numPoints);
orange To use these do: Color.RED or gObj.drawPolygon(currPolygon); Filled
Color.red Set the current drawing color Polygon gObj.fillPolygon(xArray, yArray,
using graphicsObj.setColor(colorObj); Get numPoints); gObj.fillPolygon(currPolygon);
the current drawing color using Color x1,y1. x2,y2. Georgia Institute of
currColor = graphicsObj.getColor(); Technology.
Georgia Institute of Technology. 16Drawing Lines Exercise. Write a method
8Using Classes in Packages. Java (drawX) for adding two crossed lines to a
organizes classes into packages Groups of picture Using a passed color Start one
related classes The full name of a class line at the top left corner of the picture
is packageName.ClassName java.awt.Color If End it at the bottom right corner of the
you want to use just the class name to picture Start the other line at the bottom
refer to a class in a package Use the left of the picture End it at the top
import statement before the class right You can test it with barbara.jpg.
definition in your class import Georgia Institute of Technology.
java.awt.Color; // to allow you to use 17Summary. You can draw using Turtle
Color or import java.awt.*; // to use any objects Or you can use java.awt.Graphics
class in this package. Georgia Institute to do drawing Get the Graphics object from
of Technology. a Picture object Graphics graphics =
9Graphics Environment. 0,0. +X. 0, 0 is pictureObj.getGraphics(); Set the color
at the top left X increases to the right Y graphics.setColor(Color.RED); Do some
increases going down the page. +Y. simple drawing
400,200. Graphics are often positioned by graphics.drawLine(x1,y1,x2,y2);
their top left corner Coordinate units are graphics.drawOval(x1,y1,width,height);
measured in pixels. Georgia Institute of graphics.drawString(“string to
Technology. draw”,leftX,baseline); Georgia Institute
10Drawing Circles and Ellipses. of Technology.
Drawing in Java part.ppt
http://900igr.net/kartinka/anglijskij-jazyk/drawing-in-java-part-119550.html
cсылка на страницу

Drawing in Java part

другие презентации на тему «Drawing in Java part»

«Информационные технологии в английском языке» - Сеть творческих учителей. Части речи. Исследование изменения британского населения. A good teacher. Новые слова. Сайты для увлекательного обучения грамматике. Подборка листов. Английский язык в школе. Сетевое общество учителей. Всероссийский интернет-педсовет. Слушайте, учите, говорите. Профессиональный материал.

«Традиции Великобритании» - Сопоставление и анализ собранных данных. обработка результатов исследований. Дисскусия «Почему нужно знать традиции своей страны?». В процессе выполнения проекта вы найдёте ответы на вопросы: Исследовательская работа групп. Откуда берутся традиции? Обе группы занимаются поиском информации в различных источниках: 1 группа – TRAVELERS.

«New Year» - A little history. Christmas tree in Russia. New Year is called magical, mysterious, wonderful, unique and charming. Russian tradition. Christmas decorations. New Year: History and tradition. Good luck in the new year! Above the tree ... did not enjoy a special sympathy. In addition to toys, Christmas tree decorated with sweets, fruits and nuts.

«My working day» - After that, I go to the bathroom. I eat breakfast at 8 o‘clock. GOOD MORNING!!! Good night. I go home at 18 o’clock. After that,I watch TV,and listen music. I wash my face. I go to the bed at 21 o‘clock. MY WORKING DAY. Then,I do my homework. I get up at 7 o‘clock. In the bathroom. I наvе dinner at half past 11.

«Весёлый алфавит» - Zoo. Fox. Eagle. Rabbit. Xerox. Воскресенье. Wolf. Girl. Камень. Squirrel. Merry alphabet. Parrot. Свирепый тигр. Разноцветный мячик. Апельсин. Кенгуру. Королева. Umbrella. Lion. Vase. Мороженое. Кукла. Яхта. Яблоко с ветки. Mouse. Hamster. Kот Василий.

«The english-speaking countries» - The English-speaking countries. Scotland. Disneyland. USA. Great Britain. Australia.

Без темы

661 презентация
Урок

Английский язык

29 тем
Картинки