xref: /haiku/docs/user/interface/Shape.dox (revision a8081885d2bcc5076d27ea1cbc5b9c0cc60f1126)
1*cb65c3a0SJohn Scipione/*
2*cb65c3a0SJohn Scipione * Copyright 2003-2014 Haiku, Inc. All rights reserved.
3*cb65c3a0SJohn Scipione * Distributed under the terms of the MIT License.
4*cb65c3a0SJohn Scipione *
5*cb65c3a0SJohn Scipione * Authors:
6*cb65c3a0SJohn Scipione *		Marc Flerackers, mflerackers@androme.be
7*cb65c3a0SJohn Scipione *		John Scipione, jscipione@gmail.com
8*cb65c3a0SJohn Scipione *
9*cb65c3a0SJohn Scipione * Corresponds to:
10*cb65c3a0SJohn Scipione *		headers/os/interface/Shape.h	 hrev47496
11*cb65c3a0SJohn Scipione *		src/kits/interface/Shape.cpp	 hrev47496
12*cb65c3a0SJohn Scipione */
13*cb65c3a0SJohn Scipione
14*cb65c3a0SJohn Scipione
15*cb65c3a0SJohn Scipione/*!
16*cb65c3a0SJohn Scipione	\file Shape.h
17*cb65c3a0SJohn Scipione	\ingroup interface
18*cb65c3a0SJohn Scipione	\ingroup libbe
19*cb65c3a0SJohn Scipione	\brief BShape and BShapeIterator class definitions.
20*cb65c3a0SJohn Scipione*/
21*cb65c3a0SJohn Scipione
22*cb65c3a0SJohn Scipione
23*cb65c3a0SJohn Scipione/*!
24*cb65c3a0SJohn Scipione	\class BShapeIterator
25*cb65c3a0SJohn Scipione	\ingroup interface
26*cb65c3a0SJohn Scipione	\ingroup libbe
27*cb65c3a0SJohn Scipione	\brief Allows you to iterate through BShape operations.
28*cb65c3a0SJohn Scipione
29*cb65c3a0SJohn Scipione	You should override this class and implement the IterateMoveTo(),
30*cb65c3a0SJohn Scipione	IterateLineTo(), IterateBezierTo(), IterateClose(), and IterateArcTo()
31*cb65c3a0SJohn Scipione	methods which correspond to BShape::MoveTo(), BShape::LineTo(),
32*cb65c3a0SJohn Scipione	BShape::BezierTo(), BShape::Close() and BShape::ArcTo() respectively.
33*cb65c3a0SJohn Scipione
34*cb65c3a0SJohn Scipione	\sa BShape
35*cb65c3a0SJohn Scipione
36*cb65c3a0SJohn Scipione	\since BeOS R4
37*cb65c3a0SJohn Scipione*/
38*cb65c3a0SJohn Scipione
39*cb65c3a0SJohn Scipione
40*cb65c3a0SJohn Scipione/*!
41*cb65c3a0SJohn Scipione	\fn BShapeIterator::BShapeIterator()
42*cb65c3a0SJohn Scipione	\brief Constructor, does nothing.
43*cb65c3a0SJohn Scipione
44*cb65c3a0SJohn Scipione	This method does nothing and should be implemented by derived classes.
45*cb65c3a0SJohn Scipione
46*cb65c3a0SJohn Scipione	\since BeOS R4
47*cb65c3a0SJohn Scipione*/
48*cb65c3a0SJohn Scipione
49*cb65c3a0SJohn Scipione
50*cb65c3a0SJohn Scipione/*!
51*cb65c3a0SJohn Scipione	\fn BShapeIterator::~BShapeIterator()
52*cb65c3a0SJohn Scipione	\brief Destructor, does nothing.
53*cb65c3a0SJohn Scipione
54*cb65c3a0SJohn Scipione	This method does nothing and should be implemented by derived classes.
55*cb65c3a0SJohn Scipione
56*cb65c3a0SJohn Scipione	\since BeOS R4
57*cb65c3a0SJohn Scipione*/
58*cb65c3a0SJohn Scipione
59*cb65c3a0SJohn Scipione
60*cb65c3a0SJohn Scipione/*!
61*cb65c3a0SJohn Scipione	\fn status_t BShapeIterator::Iterate(BShape* shape)
62*cb65c3a0SJohn Scipione	\brief Iterates over each operation that make up the BShape calling
63*cb65c3a0SJohn Scipione	       IterateMoveTo(), IterateLineTo(), IterateBezierTo(),
64*cb65c3a0SJohn Scipione	       IterateClose() or IterateArcTo() depending on the operation.
65*cb65c3a0SJohn Scipione
66*cb65c3a0SJohn Scipione	\brief shape The BShape object to iterate through.
67*cb65c3a0SJohn Scipione
68*cb65c3a0SJohn Scipione	\return Always returns \c B_OK. You should override this method
69*cb65c3a0SJohn Scipione	        to return an appropriate status code.
70*cb65c3a0SJohn Scipione
71*cb65c3a0SJohn Scipione	\since BeOS R4
72*cb65c3a0SJohn Scipione*/
73*cb65c3a0SJohn Scipione
74*cb65c3a0SJohn Scipione
75*cb65c3a0SJohn Scipione/*!
76*cb65c3a0SJohn Scipione	\fn status_t BShapeIterator::IterateMoveTo(BPoint* point)
77*cb65c3a0SJohn Scipione	\brief Called by Iterate() to act on \a point.
78*cb65c3a0SJohn Scipione
79*cb65c3a0SJohn Scipione	This method does nothing and should be implemented by derived classes.
80*cb65c3a0SJohn Scipione
81*cb65c3a0SJohn Scipione	\param point The point to act on.
82*cb65c3a0SJohn Scipione
83*cb65c3a0SJohn Scipione	\return Always returns \c B_OK. You should override this method
84*cb65c3a0SJohn Scipione	        to return an appropriate status code.
85*cb65c3a0SJohn Scipione
86*cb65c3a0SJohn Scipione	\since BeOS R4
87*cb65c3a0SJohn Scipione*/
88*cb65c3a0SJohn Scipione
89*cb65c3a0SJohn Scipione
90*cb65c3a0SJohn Scipione/*!
91*cb65c3a0SJohn Scipione	\fn status_t BShapeIterator::IterateLineTo(int32 lineCount,
92*cb65c3a0SJohn Scipione		BPoint* linePoints)
93*cb65c3a0SJohn Scipione	\brief Called by Iterate() to act on \a lineCount lines comprised of the
94*cb65c3a0SJohn Scipione	       points specified by \a linePoints.
95*cb65c3a0SJohn Scipione
96*cb65c3a0SJohn Scipione	This method does nothing and should be implemented by derived classes.
97*cb65c3a0SJohn Scipione
98*cb65c3a0SJohn Scipione	\param lineCount The number of points in \a linePoints.
99*cb65c3a0SJohn Scipione	\param linePoints The list of points of lines to act on.
100*cb65c3a0SJohn Scipione
101*cb65c3a0SJohn Scipione	\return Always returns \c B_OK. You should override this method
102*cb65c3a0SJohn Scipione	        to return an appropriate status code.
103*cb65c3a0SJohn Scipione
104*cb65c3a0SJohn Scipione	\since BeOS R4
105*cb65c3a0SJohn Scipione*/
106*cb65c3a0SJohn Scipione
107*cb65c3a0SJohn Scipione
108*cb65c3a0SJohn Scipione/*!
109*cb65c3a0SJohn Scipione	\fn status_t BShapeIterator::IterateBezierTo(int32 bezierCount,
110*cb65c3a0SJohn Scipione		BPoint* bezierPoints)
111*cb65c3a0SJohn Scipione	\brief Called by Iterate() to act on \a bezierCount Bézier curves
112*cb65c3a0SJohn Scipione	       comprised of the points specified by \a bezierPoints.
113*cb65c3a0SJohn Scipione
114*cb65c3a0SJohn Scipione	This method does nothing and should be implemented by derived classes.
115*cb65c3a0SJohn Scipione
116*cb65c3a0SJohn Scipione	\param bezierCount The number of points in \a bezierPoints.
117*cb65c3a0SJohn Scipione	\param bezierPoints The list of Bézier curve points to act on.
118*cb65c3a0SJohn Scipione
119*cb65c3a0SJohn Scipione	\return Always returns \c B_OK. You should override this method
120*cb65c3a0SJohn Scipione	        to return an appropriate status code.
121*cb65c3a0SJohn Scipione
122*cb65c3a0SJohn Scipione	\since BeOS R4
123*cb65c3a0SJohn Scipione*/
124*cb65c3a0SJohn Scipione
125*cb65c3a0SJohn Scipione
126*cb65c3a0SJohn Scipione/*!
127*cb65c3a0SJohn Scipione	\fn status_t BShapeIterator::IterateClose()
128*cb65c3a0SJohn Scipione	\brief Called by Iterate() to close the BShape.
129*cb65c3a0SJohn Scipione
130*cb65c3a0SJohn Scipione	This method does nothing and should be implemented by derived classes.
131*cb65c3a0SJohn Scipione
132*cb65c3a0SJohn Scipione	\return Always returns \c B_OK. You should override this method
133*cb65c3a0SJohn Scipione	        to return an appropriate status code.
134*cb65c3a0SJohn Scipione
135*cb65c3a0SJohn Scipione	\since BeOS R4
136*cb65c3a0SJohn Scipione*/
137*cb65c3a0SJohn Scipione
138*cb65c3a0SJohn Scipione
139*cb65c3a0SJohn Scipione/*!
140*cb65c3a0SJohn Scipione	\fn status_t BShapeIterator::IterateArcTo(float& rx, float& ry,
141*cb65c3a0SJohn Scipione		float& angle, bool largeArc, bool counterClockWise, BPoint& point)
142*cb65c3a0SJohn Scipione	\brief Called by Iterate() to act on an arc.
143*cb65c3a0SJohn Scipione
144*cb65c3a0SJohn Scipione	\param rx The horizontal radius of the arc to act on.
145*cb65c3a0SJohn Scipione	\param ry The vertical radius of the arc to act on.
146*cb65c3a0SJohn Scipione	\param angle The starting angle of the arc in degrees to act on.
147*cb65c3a0SJohn Scipione	\param largeArc Whether or not to draw a large arc.
148*cb65c3a0SJohn Scipione	\param counterClockWise \c true if the arc is drawn counter-clockwise, \c false
149*cb65c3a0SJohn Scipione	       if the arc is drawn clockwise.
150*cb65c3a0SJohn Scipione	\param point The center point of the arc to act on.
151*cb65c3a0SJohn Scipione
152*cb65c3a0SJohn Scipione	This method does nothing and should be implemented by derived classes.
153*cb65c3a0SJohn Scipione
154*cb65c3a0SJohn Scipione	\return Always returns \c B_OK. You should override this method
155*cb65c3a0SJohn Scipione	        to return an appropriate status code.
156*cb65c3a0SJohn Scipione
157*cb65c3a0SJohn Scipione	\since Haiku R1
158*cb65c3a0SJohn Scipione*/
159*cb65c3a0SJohn Scipione
160*cb65c3a0SJohn Scipione
161*cb65c3a0SJohn Scipione/*!
162*cb65c3a0SJohn Scipione	\class BShape
163*cb65c3a0SJohn Scipione	\ingroup interface
164*cb65c3a0SJohn Scipione	\ingroup libbe
165*cb65c3a0SJohn Scipione	\brief Encapsulates a Postscript-style "path".
166*cb65c3a0SJohn Scipione
167*cb65c3a0SJohn Scipione	You can obtain the outlines of characters from a string as BShape objects
168*cb65c3a0SJohn Scipione	by calling BFont::GetGlyphShapes().
169*cb65c3a0SJohn Scipione
170*cb65c3a0SJohn Scipione	\since BeOS R4
171*cb65c3a0SJohn Scipione*/
172*cb65c3a0SJohn Scipione
173*cb65c3a0SJohn Scipione
174*cb65c3a0SJohn Scipione/*!
175*cb65c3a0SJohn Scipione	\fn BShape::BShape()
176*cb65c3a0SJohn Scipione	\brief Creates an empty BShape object.
177*cb65c3a0SJohn Scipione
178*cb65c3a0SJohn Scipione	\since BeOS R4
179*cb65c3a0SJohn Scipione*/
180*cb65c3a0SJohn Scipione
181*cb65c3a0SJohn Scipione
182*cb65c3a0SJohn Scipione/*!
183*cb65c3a0SJohn Scipione	\fn BShape::BShape(const BShape& other)
184*cb65c3a0SJohn Scipione	\brief Creates a new BShape object as a copy of \a other.
185*cb65c3a0SJohn Scipione
186*cb65c3a0SJohn Scipione	\param other The BShape object to copy from.
187*cb65c3a0SJohn Scipione
188*cb65c3a0SJohn Scipione	\since BeOS R4
189*cb65c3a0SJohn Scipione*/
190*cb65c3a0SJohn Scipione
191*cb65c3a0SJohn Scipione
192*cb65c3a0SJohn Scipione/*!
193*cb65c3a0SJohn Scipione	\fn BShape::BShape(BMessage* archive)
194*cb65c3a0SJohn Scipione	\brief Creates a new BShape message from an \a archive message.
195*cb65c3a0SJohn Scipione
196*cb65c3a0SJohn Scipione	You should call Instantiate() instead as it will validate whether
197*cb65c3a0SJohn Scipione	or not the object was created successfully.
198*cb65c3a0SJohn Scipione
199*cb65c3a0SJohn Scipione	\param archive The BMessage object to construct the data from.
200*cb65c3a0SJohn Scipione
201*cb65c3a0SJohn Scipione	\since BeOS R4
202*cb65c3a0SJohn Scipione*/
203*cb65c3a0SJohn Scipione
204*cb65c3a0SJohn Scipione
205*cb65c3a0SJohn Scipione/*!
206*cb65c3a0SJohn Scipione	\fn BShape::~BShape()
207*cb65c3a0SJohn Scipione	\brief Destructor, deletes all associated data.
208*cb65c3a0SJohn Scipione
209*cb65c3a0SJohn Scipione	\since BeOS R4
210*cb65c3a0SJohn Scipione*/
211*cb65c3a0SJohn Scipione
212*cb65c3a0SJohn Scipione
213*cb65c3a0SJohn Scipione/*!
214*cb65c3a0SJohn Scipione	\name Archiving
215*cb65c3a0SJohn Scipione*/
216*cb65c3a0SJohn Scipione
217*cb65c3a0SJohn Scipione
218*cb65c3a0SJohn Scipione//! @{
219*cb65c3a0SJohn Scipione
220*cb65c3a0SJohn Scipione
221*cb65c3a0SJohn Scipione/*!
222*cb65c3a0SJohn Scipione	\fn status_t BShape::Archive(BMessage* archive, bool deep) const
223*cb65c3a0SJohn Scipione	\brief Archives the BShape object to a BMessage.
224*cb65c3a0SJohn Scipione
225*cb65c3a0SJohn Scipione	\param archive The BMessage object to archive the BShape data to.
226*cb65c3a0SJohn Scipione	\param deep Currently unused.
227*cb65c3a0SJohn Scipione
228*cb65c3a0SJohn Scipione	\return A status code, \c B_OK on scucess or an error code otherwise.
229*cb65c3a0SJohn Scipione
230*cb65c3a0SJohn Scipione	\since BeOS R4
231*cb65c3a0SJohn Scipione*/
232*cb65c3a0SJohn Scipione
233*cb65c3a0SJohn Scipione
234*cb65c3a0SJohn Scipione/*!
235*cb65c3a0SJohn Scipione	\fn BArchivable* BShape::Instantiate(BMessage* archive)
236*cb65c3a0SJohn Scipione	\brief Creates a new BShape object from an \a archive message.
237*cb65c3a0SJohn Scipione
238*cb65c3a0SJohn Scipione	\param archive The BMessage object to construct the BShape data from.
239*cb65c3a0SJohn Scipione
240*cb65c3a0SJohn Scipione	\return A new BShape object or \c NULL if \a archive was invalid.
241*cb65c3a0SJohn Scipione
242*cb65c3a0SJohn Scipione	\since BeOS R4
243*cb65c3a0SJohn Scipione*/
244*cb65c3a0SJohn Scipione
245*cb65c3a0SJohn Scipione
246*cb65c3a0SJohn Scipione//! @}
247*cb65c3a0SJohn Scipione
248*cb65c3a0SJohn Scipione
249*cb65c3a0SJohn Scipione/*!
250*cb65c3a0SJohn Scipione	\name Operators
251*cb65c3a0SJohn Scipione*/
252*cb65c3a0SJohn Scipione
253*cb65c3a0SJohn Scipione
254*cb65c3a0SJohn Scipione//! @{
255*cb65c3a0SJohn Scipione
256*cb65c3a0SJohn Scipione
257*cb65c3a0SJohn Scipione/*!
258*cb65c3a0SJohn Scipione	\fn BShape& BShape::operator=(const BShape& other)
259*cb65c3a0SJohn Scipione	\brief Constructs a BShape object as a copy of \a other by overloading
260*cb65c3a0SJohn Scipione	       the = operator.
261*cb65c3a0SJohn Scipione
262*cb65c3a0SJohn Scipione	\param other The BShape object to copy from.
263*cb65c3a0SJohn Scipione
264*cb65c3a0SJohn Scipione	\brief Always returns *this.
265*cb65c3a0SJohn Scipione
266*cb65c3a0SJohn Scipione	\since Haiku R1
267*cb65c3a0SJohn Scipione*/
268*cb65c3a0SJohn Scipione
269*cb65c3a0SJohn Scipione
270*cb65c3a0SJohn Scipione/*!
271*cb65c3a0SJohn Scipione	\fn bool BShape::operator==(const BShape& other) const
272*cb65c3a0SJohn Scipione	\brief Returns whether or not the contents of this BShape and \a other
273*cb65c3a0SJohn Scipione	       contain the same data.
274*cb65c3a0SJohn Scipione
275*cb65c3a0SJohn Scipione	\return \c true if the contents are equal, \c false otherwise.
276*cb65c3a0SJohn Scipione
277*cb65c3a0SJohn Scipione	\since Haiku R1
278*cb65c3a0SJohn Scipione*/
279*cb65c3a0SJohn Scipione
280*cb65c3a0SJohn Scipione
281*cb65c3a0SJohn Scipione/*!
282*cb65c3a0SJohn Scipione	\fn bool BShape::operator!=(const BShape& other) const
283*cb65c3a0SJohn Scipione	\brief Returns whether or not the contents of this BShape and \a other
284*cb65c3a0SJohn Scipione	       do NOT contain the same data.
285*cb65c3a0SJohn Scipione
286*cb65c3a0SJohn Scipione	\return \c true if the contents are NOT equal, \c false otherwise.
287*cb65c3a0SJohn Scipione
288*cb65c3a0SJohn Scipione	\since Haiku R1
289*cb65c3a0SJohn Scipione*/
290*cb65c3a0SJohn Scipione
291*cb65c3a0SJohn Scipione
292*cb65c3a0SJohn Scipione//! @}
293*cb65c3a0SJohn Scipione
294*cb65c3a0SJohn Scipione
295*cb65c3a0SJohn Scipione/*!
296*cb65c3a0SJohn Scipione	\fn void BShape::Clear()
297*cb65c3a0SJohn Scipione	\brief Deletes all data returning the BShape to an empty state.
298*cb65c3a0SJohn Scipione
299*cb65c3a0SJohn Scipione	\since BeOS R4
300*cb65c3a0SJohn Scipione*/
301*cb65c3a0SJohn Scipione
302*cb65c3a0SJohn Scipione
303*cb65c3a0SJohn Scipione/*!
304*cb65c3a0SJohn Scipione	\fn BRect BShape::Bounds() const
305*cb65c3a0SJohn Scipione	\brief Returns a BRect that encloses all points in the BShape.
306*cb65c3a0SJohn Scipione
307*cb65c3a0SJohn Scipione	\warning This implementation doesn't take into account curves at all.
308*cb65c3a0SJohn Scipione
309*cb65c3a0SJohn Scipione	\since BeOS R4
310*cb65c3a0SJohn Scipione*/
311*cb65c3a0SJohn Scipione
312*cb65c3a0SJohn Scipione
313*cb65c3a0SJohn Scipione/*!
314*cb65c3a0SJohn Scipione	\fn BPoint BShape::CurrentPosition() const
315*cb65c3a0SJohn Scipione	\brief Returns the current end point of the path.
316*cb65c3a0SJohn Scipione
317*cb65c3a0SJohn Scipione	\return The current end point of the path or \c B_ORIGIN if no points have
318*cb65c3a0SJohn Scipione	        been added yet.
319*cb65c3a0SJohn Scipione
320*cb65c3a0SJohn Scipione	\since Haiku R1
321*cb65c3a0SJohn Scipione*/
322*cb65c3a0SJohn Scipione
323*cb65c3a0SJohn Scipione
324*cb65c3a0SJohn Scipione/*!
325*cb65c3a0SJohn Scipione	\fn status_t BShape::AddShape(const BShape* otherShape)
326*cb65c3a0SJohn Scipione	\brief Adds the lines and curves of \a otherShape to BShape.
327*cb65c3a0SJohn Scipione
328*cb65c3a0SJohn Scipione	\return Always returns \c B_OK.
329*cb65c3a0SJohn Scipione
330*cb65c3a0SJohn Scipione	\since BeOS R4
331*cb65c3a0SJohn Scipione*/
332*cb65c3a0SJohn Scipione
333*cb65c3a0SJohn Scipione
334*cb65c3a0SJohn Scipione/*!
335*cb65c3a0SJohn Scipione	\name Operations
336*cb65c3a0SJohn Scipione*/
337*cb65c3a0SJohn Scipione
338*cb65c3a0SJohn Scipione
339*cb65c3a0SJohn Scipione//! @{
340*cb65c3a0SJohn Scipione
341*cb65c3a0SJohn Scipione
342*cb65c3a0SJohn Scipione/*!
343*cb65c3a0SJohn Scipione	\fn status_t BShape::MoveTo(BPoint point)
344*cb65c3a0SJohn Scipione	\brief Adds a "move to" operation to the BShape.
345*cb65c3a0SJohn Scipione
346*cb65c3a0SJohn Scipione	The next LineTo() or BezierTo() will begin at \a point allowing you to
347*cb65c3a0SJohn Scipione	create noncontiguous shapes.
348*cb65c3a0SJohn Scipione
349*cb65c3a0SJohn Scipione	\param point The point to start the next LineTo() or BezierTo() at.
350*cb65c3a0SJohn Scipione
351*cb65c3a0SJohn Scipione	\return Returns a status code, \c B_OK on success or an error code
352*cb65c3a0SJohn Scipione	        otherwise.
353*cb65c3a0SJohn Scipione	\retval B_OK The operation was added successfully.
354*cb65c3a0SJohn Scipione	\retval B_NO_MEMORY Ran out of memory while trying to add the operation.
355*cb65c3a0SJohn Scipione
356*cb65c3a0SJohn Scipione	\since BeOS R4
357*cb65c3a0SJohn Scipione*/
358*cb65c3a0SJohn Scipione
359*cb65c3a0SJohn Scipione
360*cb65c3a0SJohn Scipione/*!
361*cb65c3a0SJohn Scipione	\fn status_t BShape::LineTo(BPoint point)
362*cb65c3a0SJohn Scipione	\brief Adds a "draw line" operation to the BShape.
363*cb65c3a0SJohn Scipione
364*cb65c3a0SJohn Scipione	A line will be drawn from the previous point to the \a point specified.
365*cb65c3a0SJohn Scipione
366*cb65c3a0SJohn Scipione	\param point The point to draw a line to starting at the previous location.
367*cb65c3a0SJohn Scipione
368*cb65c3a0SJohn Scipione	\return Returns a status code, \c B_OK on success or an error code
369*cb65c3a0SJohn Scipione	        otherwise.
370*cb65c3a0SJohn Scipione	\retval B_OK The operation was added successfully.
371*cb65c3a0SJohn Scipione	\retval B_NO_MEMORY Ran out of memory while trying to add the operation.
372*cb65c3a0SJohn Scipione
373*cb65c3a0SJohn Scipione	\since BeOS R4
374*cb65c3a0SJohn Scipione*/
375*cb65c3a0SJohn Scipione
376*cb65c3a0SJohn Scipione
377*cb65c3a0SJohn Scipione/*!
378*cb65c3a0SJohn Scipione	\fn status_t BShape::BezierTo(BPoint controlPoints[3])
379*cb65c3a0SJohn Scipione	\brief Adds a "draw Bézier curve" operation to the BShape.
380*cb65c3a0SJohn Scipione
381*cb65c3a0SJohn Scipione	A Bézier curve is drawn that begins at the current point and is made up
382*cb65c3a0SJohn Scipione	of the specified \a controlPoints.
383*cb65c3a0SJohn Scipione
384*cb65c3a0SJohn Scipione	\param controlPoints The points that make up the Bézier curve.
385*cb65c3a0SJohn Scipione
386*cb65c3a0SJohn Scipione	\return Returns a status code, \c B_OK on success or an error code
387*cb65c3a0SJohn Scipione	        otherwise.
388*cb65c3a0SJohn Scipione	\retval B_OK The operation was added successfully.
389*cb65c3a0SJohn Scipione	\retval B_NO_MEMORY Ran out of memory while trying to add the operation.
390*cb65c3a0SJohn Scipione
391*cb65c3a0SJohn Scipione	\since BeOS R4
392*cb65c3a0SJohn Scipione*/
393*cb65c3a0SJohn Scipione
394*cb65c3a0SJohn Scipione
395*cb65c3a0SJohn Scipione/*!
396*cb65c3a0SJohn Scipione	\fn status_t BShape::BezierTo(const BPoint& control1,
397*cb65c3a0SJohn Scipione		const BPoint& control2, const BPoint& endPoint)
398*cb65c3a0SJohn Scipione	\brief Adds a "draw Bézier curve" operation to the BShape.
399*cb65c3a0SJohn Scipione
400*cb65c3a0SJohn Scipione	A Bézier curve is drawn that begins at the current point and is made up
401*cb65c3a0SJohn Scipione	of the specified points.
402*cb65c3a0SJohn Scipione
403*cb65c3a0SJohn Scipione	\param control1 The first control point of the Bézier curve.
404*cb65c3a0SJohn Scipione	\param control2 The second control point of the Bézier curve.
405*cb65c3a0SJohn Scipione	\param endPoint The end point of the Bézier curve.
406*cb65c3a0SJohn Scipione
407*cb65c3a0SJohn Scipione	\return Returns a status code, \c B_OK on success or an error code
408*cb65c3a0SJohn Scipione	        otherwise.
409*cb65c3a0SJohn Scipione	\retval B_OK The operation was added successfully.
410*cb65c3a0SJohn Scipione	\retval B_NO_MEMORY Ran out of memory while trying to add the operation.
411*cb65c3a0SJohn Scipione
412*cb65c3a0SJohn Scipione	\since Haiku R1
413*cb65c3a0SJohn Scipione*/
414*cb65c3a0SJohn Scipione
415*cb65c3a0SJohn Scipione
416*cb65c3a0SJohn Scipione/*!
417*cb65c3a0SJohn Scipione	\fn status_t BShape::ArcTo(float rx, float ry, float angle, bool largeArc,
418*cb65c3a0SJohn Scipione		bool counterClockWise, const BPoint& point)
419*cb65c3a0SJohn Scipione	\brief Adds a "draw arc" operation to the BShape.
420*cb65c3a0SJohn Scipione
421*cb65c3a0SJohn Scipione	An arc is draw that begins at the current point and is specified by the
422*cb65c3a0SJohn Scipione	parameters to this method.
423*cb65c3a0SJohn Scipione
424*cb65c3a0SJohn Scipione	\param rx The horizontal radius of the arc.
425*cb65c3a0SJohn Scipione	\param ry The vertical radius of the arc.
426*cb65c3a0SJohn Scipione	\param angle The starting angle of the arc in degrees.
427*cb65c3a0SJohn Scipione	\param largeArc Whether or not to draw a large arc.
428*cb65c3a0SJohn Scipione	\param counterClockWise \c true to draw the arc counter-clockwise, \c false
429*cb65c3a0SJohn Scipione	       to draw the arc clockwise.
430*cb65c3a0SJohn Scipione	\param point The center point of the arc.
431*cb65c3a0SJohn Scipione
432*cb65c3a0SJohn Scipione	\return Returns a status code, \c B_OK on success or an error code
433*cb65c3a0SJohn Scipione	        otherwise.
434*cb65c3a0SJohn Scipione	\retval B_OK The operation was added successfully.
435*cb65c3a0SJohn Scipione	\retval B_NO_MEMORY Ran out of memory while trying to add the operation.
436*cb65c3a0SJohn Scipione
437*cb65c3a0SJohn Scipione	\since Haiku R1
438*cb65c3a0SJohn Scipione*/
439*cb65c3a0SJohn Scipione
440*cb65c3a0SJohn Scipione
441*cb65c3a0SJohn Scipione/*!
442*cb65c3a0SJohn Scipione	\fn status_t BShape::Close()
443*cb65c3a0SJohn Scipione	\brief Adds an operation to close the BShape once it is fully constructed.
444*cb65c3a0SJohn Scipione
445*cb65c3a0SJohn Scipione	\return Returns a status code, \c B_OK on success or an error code
446*cb65c3a0SJohn Scipione	       otherwise.
447*cb65c3a0SJohn Scipione	\retval B_OK The operation was added successfully.
448*cb65c3a0SJohn Scipione	\retval B_NO_MEMORY Ran out of memory while trying to add the operation.
449*cb65c3a0SJohn Scipione
450*cb65c3a0SJohn Scipione	\since BeOS R4
451*cb65c3a0SJohn Scipione*/
452*cb65c3a0SJohn Scipione
453*cb65c3a0SJohn Scipione
454*cb65c3a0SJohn Scipione//! @}
455