rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Prototypes Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvFillAccessor Class Reference

Polygon filling behavior. More...

#include <ilviews/protos/fillacc.h>

Inheritance diagram for IlvFillAccessor:
IlvUserAccessor IlvAccessor

List of all members.

Public Member Functions

 IlvFillAccessor (const char *name, const IlvValueTypeClass *type, const char *nodeName, const char *fillerName, const char *angle)
 Creates a fill behavior.

Protected Member Functions

virtual IlBoolean changeValue (IlvAccessorHolder *object, const IlvValue &val)
 Called by the method IlvAccessible::changeValue for each IlvAccessor attached to the IlvAccessorHolder.
virtual IlvValuequeryValue (const IlvAccessorHolder *object, IlvValue &val) const
 Called by the method IlvAccessible::queryValue for each IlvAccessor attached to the IlvAccessorHolder.

Detailed Description

Polygon filling behavior.

Library: ilvproto

IlvFillAccessor is a subtype of IlvUserAccessor used to "fill" a polygon with another one up to a specified level. It can be used to represent filled tanks or pipes with arbitrary shapes.


Constructor & Destructor Documentation

IlvFillAccessor::IlvFillAccessor ( const char *  name,
const IlvValueTypeClass type,
const char *  nodeName,
const char *  fillerName,
const char *  angle 
)

Creates a fill behavior.

This accessor handles a value of name name that represents a filling ratio. The ratio is a floating-point value between 0.0 and 1.0. When the value is changed, the points of the filler polygon are computed so that it is superposed over the filled polygon (except that it is truncated at the level specified by the fill ratio). The filler polygon can be created initially with any number of points and any geometry: its points will be completely recomputed. The fill ratio defines the height of the filler polygon with respect to the height of the filled polygon, and not its surface. The height is computed in the direction defined by the angle. The example below shows a polyline filled with a polygon at a ratio of 0.6 and an angle of 45 degrees.

IlvFillAccessora.gif
Parameters:
name Name of the attribute.
type Type of the attribute. It should be a numeric type such as IlvFloatValueType.
nodename Name of a graphic node that must contain an instance of a subclass of IlvPolyPoints (the "filled" polygon).
fillerName Name of a graphic node that must contain another IlvPolyPoints (the "filler" polygon).
angle Specifies the angle (in degrees) at which the polygon is filled, that is, the angle of the segment representing the limit of the filling fluid. If angle is equal to 0, the polygon is filled from bottom to top, and the segment is horizontal. If angle is equal to 90, the polygon is filled from left to right, and the segment is vertical. angle can take any value, not only multiples of 90. The angle parameter can contain a constant value (for example, 90), the name of another accessor (for example, fillAngle), or any arithmetic expression containing accessor names or constants (for example, radians/3.1415*180).
See also:
IlvUserAccessor::getValue.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.