Table Of Contents

Previous topic

RasterOperationMode

Next topic

Rect

This Page

phoenix_title RealPoint

A RealPoint is a useful data structure for graphics operations.

It contains floating point x and y members. See Point for an integer version.

Note that the coordinates stored inside a RealPoint object may be negative and that RealPoint functions do not perform any check against negative values.

See also

Point


class_hierarchy Inheritance Diagram

Inheritance diagram for class RealPoint

Inheritance diagram of RealPoint


method_summary Methods Summary

__init__ Initializes to zero the x and y members.
Get Return the point’s properties as a tuple.
__getitem__  
__len__  
__nonzero__  
__reduce__  
__repr__  
__setitem__  
__str__  
__iadd__  
__isub__  

api Class API



class RealPoint(object)

A RealPoint is a useful data structure for graphics operations.

Possible constructors:

RealPoint()

RealPoint(x, y)

RealPoint(pt)

Methods



__init__(self, *args, **kw)

overload Overloaded Implementations:



__init__ (self)

Initializes to zero the x and y members.



__init__ (self, x, y)

Initializes the point with the given coordinates.

Parameters:
  • x (float) –
  • y (float) –



__init__ (self, pt)

Converts the given Point (with integer coordinates) to a RealPoint.

Parameters:pt (Point) –





Get(self)

Return the point’s properties as a tuple.

Return type:tuple
Returns:( x, y )


__getitem__(self, idx)


__len__(self)


__nonzero__(self)


__reduce__(self)


__repr__(self)


__setitem__(self, idx, val)


__str__(self)


__iadd__(self, *args, **kw)

overload Overloaded Implementations:



__iadd__ (self)

Parameters:sz (Size) –



__iadd__ (self)

Parameters:pt (RealPoint) –





__isub__(self, *args, **kw)

overload Overloaded Implementations:



__isub__ (self)

Parameters:sz (Size) –



__isub__ (self)

Parameters:pt (RealPoint) –