Foxit PDF SDK
foxit::pdf::SnappedPoint Class Reference
Inheritance diagram for foxit::pdf::SnappedPoint:
foxit::Base

Public Types

enum  SnappedPointType {
  e_TypeNone = 0, e_TypeEndpoint = 1, e_TypeMidpoint = 2, e_TypeIntersectionPoint = 3,
  e_TypeNearestPoint = 4
}
 Enumeration for snapped point type. More...
 

Public Member Functions

 SnappedPoint (const SnappedPoint &other)
 Constructor, with another snapped point object. More...
 
 ~SnappedPoint ()
 Destructor.
 
PointF GetPoint ()
 Get the point value. More...
 
SnappedPointType GetType ()
 Get the snapped point type. More...
 
bool IsEmpty () const
 Check whether current object is empty or not. More...
 
bool operator!= (const SnappedPoint &other) const
 Not equal operator. More...
 
SnappedPointoperator= (const SnappedPoint &other)
 Assign operator. More...
 
bool operator== (const SnappedPoint &other) const
 Equal operator. More...
 
- Public Member Functions inherited from foxit::Base
FS_HANDLE Handle () const
 Get the handle of current object. More...
 

Detailed Description

This class represents information of a snapped point, which is snapped with specified snapping flags by class SnapPointMgr.

See also
SnapPointMgr.

Member Enumeration Documentation

◆ SnappedPointType

Enumeration for snapped point type.

Values of this enumeration should be used alone.

Enumerator
e_TypeNone 

This means the snapped point is invalid.

e_TypeEndpoint 

Snapped point type: endpoint, which means the snapped point is an endpoint of a path.

e_TypeMidpoint 

Snapped point type: midpoint, which means the snapped point is the midpoint for two endpoints of a path.

e_TypeIntersectionPoint 

Snapped point type: intersection point, which means the snapped point is the intersection of two intersecting paths.

e_TypeNearestPoint 

Snapped point type: nearest point, which means the snapped point is the nearest point (which is in a path) to the specified point.

Constructor & Destructor Documentation

◆ SnappedPoint()

foxit::pdf::SnappedPoint::SnappedPoint ( const SnappedPoint other)

Constructor, with another snapped point object.

Parameters
[in]otherAnother snapped point object.

Member Function Documentation

◆ GetPoint()

PointF foxit::pdf::SnappedPoint::GetPoint ( )

Get the point value.

Point value represents a point in a path.

Returns
Snapped point value.

◆ GetType()

SnappedPointType foxit::pdf::SnappedPoint::GetType ( )

Get the snapped point type.

Returns
Snapped point type. Please refer to values starting from SnappedPoint::e_TypeNone and this would be one of these values.

◆ IsEmpty()

bool foxit::pdf::SnappedPoint::IsEmpty ( ) const

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
true means current object is empty, while false means not.

◆ operator!=()

bool foxit::pdf::SnappedPoint::operator!= ( const SnappedPoint other) const

Not equal operator.

Parameters
[in]otherAnother snapped point object. This function will check if current object is not equal to this one.
Returns
true means not equal, while false means equal.

◆ operator=()

SnappedPoint& foxit::pdf::SnappedPoint::operator= ( const SnappedPoint other)

Assign operator.

Parameters
[in]otherAnother snapped point object, whose value would be assigned to current object.
Returns
Reference to current object itself.

◆ operator==()

bool foxit::pdf::SnappedPoint::operator== ( const SnappedPoint other) const

Equal operator.

Parameters
[in]otherAnother snapped point object. This function will check if current object is equal to this one.
Returns
true means equal, while false means not equal.