Example Program - PowerPoint PPT Presentation

1 / 22
About This Presentation
Title:

Example Program

Description:

Font family. Style. Size and Spacing. Nov 11. 5. Font Families. Three types. Serif ... Font Size. Font size is measured in points ... – PowerPoint PPT presentation

Number of Views:78
Avg rating:3.0/5.0
Slides: 23
Provided by: vassilio
Category:

less

Transcript and Presenter's Notes

Title: Example Program


1
Example Program
DemoMouseInk.java
2
Example Program
DemoMouseUnistrokes.java
3
Images
DemoImage.java
DemoImage2.java
4
Text
  • Characterized by
  • Font family
  • Style
  • Size and Spacing

5
Font Families
  • Three types
  • Serif
  • A serif is a short line extending from and at an
    angle to the upper and lower strokes of a letter
  • Serif fonts facilitate human perception in
    distinguishing among letters
  • Sans serif
  • Without serifs
  • Monospaced or fixed-pitch
  • Each character occupies the same amount of
    horizontal space

6
Serifs Illustrated
AB ab AB ab
Times roman
Bookman oldstyle
7
Sans Serifs Illustrated
CD cd CD cd
Arial
Lucida sans
8
Monospaced Illustrated
IM im IM im
Courier new
OCR A Extended
9
Font Style
Hello Java World
  • Plain
  • Italic
  • Bold
  • Italic bold

Hello Java World
Hello Java World
Hello Java World
10
Font Size
  • Font size is measured in points
  • A point is the smallest typographical unit of
    measurement
  • 1 point 1 / 72 inch (i.e., 72 points per inch)

Hello Java World
48 point font size
11
Font Spacing
12
Readability of Text
  • Guidelines
  • Uppercase vs lowercase
  • WORDS WRITTEN IN BLOCK CAPITALS take longer to
    read than those written in lowercase
  • However, an important word written in CAPITALS
    is quickly perceived provided it is surrounded by
    words in lowercase
  • Serif vs. sans serif
  • For printed text, serif fonts are easier to run
    ones eyes along and take in the written content
  • For on-screen text, serif fonts generally produce
    less well than sans serif fonts due to poorer
    resolution of the display

13
Example Program (shown earlier)
14
Example Program
DemoList3.java
15
Image File Formats
  • There are many, many file formats for storing
    images
  • These include
  • gif, jpg, tiff, bmp

16
gif
  • gif graphics interchange format
  • Pronounced giff (with a hard g)
  • Introduced in 1987 by CompuServe Inc.
  • Very popular format for web pages
  • Features
  • Limited to 256 colors (8-bit)
  • Lossless data compression (compresses best for
    images with lots of repetition e.g., flat
    colors)
  • Support for transparency
  • one colour in the images pallete (usually the
    background) is treated as transparent
  • Support for animation

17
jpg
  • jpg jpeg joint photographic experts group
  • Pronounced jay-peg
  • Features
  • Always uses 24-bit color
  • Lossy data compression (up to 95 reduction, but
    with loss of image quality proportional to amount
    of compression)

18
tiff
  • tif tiff tagged image file format
  • Features
  • Supports different compression schemes (lossy and
    lossless)
  • Supports any resolution
  • Black and white, color, or grey shades

19
bmp
  • bmp bit-map
  • Standard for Windows environment
  • Uses a pixel map to hold line-by-line raster
    information
  • Features
  • No compression
  • Files are large

20
Example (1)
jpg, tif, bmp
Transparent gif
Format File Size gif 1639 jpg 5522 tif 3328 bmp 79
42
21
Example (2)
Animated gif with transparentbackground
22
Programming Challenge Solution
  • Create a GUI layout, as follows

After resizing
Upon launching
Enter some text
Enter some text
Exit
Clear
Clear
Exit
Write a Comment
User Comments (0)
About PowerShow.com