File:  [Research Unix] / researchv10dc / 630 / man / src / p_man / man3 / rectarith.3r
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:34 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Dan Cross

.ds ZZ DEVELOPMENT PACKAGE
.TH RECTARITH 3R "630 MTG"
.XE "raddp()"
.XE "rsubp()"
.SH NAME
rectarith: raddp, rsubp \- arithmetic on Rectangles
.SH SYNOPSIS
\f3
#include <dmd.h>
.br
Rectangle raddp (r, p)
.sp
Rectangle rsubp (r, p)
.sp
Rectangle r;
.br
Point p;
\fR
.SH DESCRIPTION
The
.I raddp
function
returns the Rectangle 
defined by
(\fBadd(r.origin, p)\fR, \fBadd(r.corner, p)\fR).
.PP
The
.I rsubp
function
returns the Rectangle 
defined by
.RB ( "sub(r.origin, p)" ,
.BR "sub(r.corner, p)" ).
.SH EXAMPLE
The following code will return a rectangle with the mouse coordinates
at the center of the box.
.PP
.RS 3
.ft CM
.nf
#include <dmd.h>

Rectangle 
makebox()
{
return (raddp (Rect(-15, -15, 15, 15),
          mouse.xy));

}

.ft R
.fi
.RE
.SH SEE ALSO
ptarith(3R), structures(3R).
.RE

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.