update version
[gpclib.git] / man / new-generics.Rd
blob2532de48ce265588f37917304b7d29f51e45a911
1 \name{new-generics}
2 \alias{new-generics}
3 \alias{append.poly}
4 \alias{append.poly-methods}
5 %\alias{append.poly,gpc.poly,gpc.poly-method}
6 \alias{get.bbox}
7 \alias{get.bbox-methods}
8 %\alias{get.bbox,gpc.poly-method}
9 \alias{area.poly}
10 \alias{area.poly-methods}
11 %\alias{area.poly,gpc.poly-method}
12 \alias{get.pts}
13 \alias{get.pts-methods}
14 %\alias{get.pts,gpc.poly-method}
15 \alias{scale.poly}
16 \alias{scale.poly-methods}
17 %\alias{scale.poly,gpc.poly-method}
18 %\alias{[-methods}
19 %\alias{[,gpc.poly-method}
21 \title{Generics/Methods for polygon objects}
23 \description{
24   Some generic functions and methods for polygon objects
27 \usage{
28 append.poly(x, y)
29 area.poly(object, \dots)
30 get.pts(object)
31 get.bbox(x)
32 scale.poly(x, \dots)
35 \arguments{
36   \item{x,object}{A polygon object}
37   \item{y}{A polygon object}
38   \item{\dots}{Other arguments passed to methods}
41 \section{Methods}{
42   \describe{
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"}
46       object.}
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"}
49       object.}
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"}
56       object.}
57     \item{get.bbox}{\code{signature(x = "gpc.poly")}:  Return the
58       bounding box for a \code{"gpc.poly"} object.}
59   }
60   
63 \details{
64   
68 \author{Roger D. Peng; GPC Library by Alan Murta}
71 \seealso{\code{"gpc.poly"} class documentation.}
72 \examples{
73 holepoly <- read.polyfile(system.file("poly-ex/hole-poly.txt", package =
74 "gpclib"), nohole = FALSE)
75 area.poly(holepoly)
76 stopifnot(area.poly(holepoly) == 8)
78 \keyword{methods}