Clipping Circles - PowerPoint PPT Presentation

1 / 7
About This Presentation
Title:

Clipping Circles

Description:

Clipping Circles. Test against circle's extent (bounding box) ... Clipping Polygons. Post processing maybe needed to remove connections between polygons on ... – PowerPoint PPT presentation

Number of Views:62
Avg rating:3.0/5.0
Slides: 8
Provided by: davidmic
Category:
Tags: circles | clipping

less

Transcript and Presenter's Notes

Title: Clipping Circles


1
Clipping Circles
  • Test against circles extent (bounding box)
  • Test against each quadrants extent
  • Optionally test octants
  • Then analytically solve for arc and edge
    intersections
  • Or
  • If the circle is not large, do an extent test
  • Use scissoring
  • Clip each filled scan line

2
Clipping Ellipses
  • Test against circles extent (bounding box)
  • Test against each quadrants extent
  • Then analytically solve for arc and edge
    intersections
  • Or
  • If the ellipse is not large, do an extent test
  • Use scissoring
  • Clip each filled scan line

3
Clipping Polygons
  • Sutherland-Hodgman polygon clipping
  • Uses a divide and conquer approach
  • Can clip a concave or convex polygon against a
    convex clipping polygon
  • Run several times, once for each edge

Clipping against an infinite edge
Vertices of clipped polygon
List of vertices
4
Clipping Polygons
  • Vertex list v1, v2, v3, .vn
  • Iterate from vn to v1 back to vn
  • Return either 0, 1, or 2 vertices for each
    segment

5
Clipping Polygons
  • Post processing maybe needed to remove
    connections between polygons on clipping region
    edges

6
Clipping Characters
  • Characters can be defined as a series of curves
  • Scalable, but complex to draw
  • Bitmaps
  • Not easily scalable, must save bitmaps at
    multiple resolutions
  • Can be copied from a font cache by a copypixel
    operation

7
Clipping Characters
  • Analytical clipping of characters would be too
    complex
  • Characters make up a small number of pixels
  • For both bitmap and stroked fonts
  • use extent tests against string
  • Use extent tests against each character
  • Use scissoring
  • For bitmap fonts, copypixel operations may give
    scissoring automatically
Write a Comment
User Comments (0)
About PowerShow.com