4 \alias{append.poly-methods}
5 %\alias{append.poly,gpc.poly,gpc.poly-method}
7 \alias{get.bbox-methods}
8 %\alias{get.bbox,gpc.poly-method}
10 \alias{area.poly-methods}
11 %\alias{area.poly,gpc.poly-method}
13 \alias{get.pts-methods}
14 %\alias{get.pts,gpc.poly-method}
16 \alias{scale.poly-methods}
17 %\alias{scale.poly,gpc.poly-method}
19 %\alias{[,gpc.poly-method}
21 \title{Generics/Methods for polygon objects}
24 Some generic functions and methods for polygon objects
29 area.poly(object, \dots)
36 \item{x,object}{A polygon object}
37 \item{y}{A polygon object}
38 \item{\dots}{Other arguments passed to methods}
43 \item{append.poly}{\code{signature(x = "gpc.poly", y =
44 "gpc.poly")}: Combine all contours of two \code{"gpc.poly"}
45 objects and return the combined polygon as a \code{"gpc.poly"}
47 \item{area.poly}{\code{signature(object = "gpc.poly")}: Compute and
48 return the sum of the areas of all contours in a \code{"gpc.poly"}
50 \item{scale.poly}{\code{signature(x = "gpc.poly")}: Scale (divide)
51 the x and y coordinates of a \code{"gpc.poly"} object by the
52 amount \code{xscale} and \code{yscale}, respectively. Return a
53 scaled \code{"gpc.poly"} object.}
54 \item{get.pts}{\code{signature(object = "gpc.poly")}: Return the
55 list of x and y coordinates of the vertices of a \code{"gpc.poly"}
57 \item{get.bbox}{\code{signature(x = "gpc.poly")}: Return the
58 bounding box for a \code{"gpc.poly"} object.}
68 \author{Roger D. Peng; GPC Library by Alan Murta}
71 \seealso{\code{"gpc.poly"} class documentation.}
73 holepoly <- read.polyfile(system.file("poly-ex/hole-poly.txt", package =
74 "gpclib"), nohole = FALSE)
76 stopifnot(area.poly(holepoly) == 8)