Class RelativeOffset
Offset relative to the size of the item to which it applies. The unit of measure
is the width or height of an image. A relative offset of X = 0, and Y = 0 will be centered.
An offset of (0.5, 0.5) the symbol will be moved half the width of the image to the right and half the
height of the image to the top. So the bottom left point of the image will be on
the location.
Inheritance
RelativeOffset
Assembly: Mapsui.dll
Syntax
public class RelativeOffset
Constructors
|
Edit this page
View Source
RelativeOffset()
Declaration
|
Edit this page
View Source
RelativeOffset(MPoint)
Declaration
public RelativeOffset(MPoint point)
Parameters
| Type |
Name |
Description |
| MPoint |
point |
|
|
Edit this page
View Source
RelativeOffset(RelativeOffset)
Declaration
public RelativeOffset(RelativeOffset offset)
Parameters
|
Edit this page
View Source
RelativeOffset(double, double)
Offset relative to the size of the item to which it applies. The unit of measure
is the width or height of an image. A relative offset of X = 0, and Y = 0 will be centered.
An offset of (0.5, 0.5) the symbol will be moved half the width of the image to the right and half the
height of the image to the top. So the bottom left point of the image will be on
the location.
Declaration
public RelativeOffset(double x = 0, double y = 0)
Parameters
Properties
|
Edit this page
View Source
X
Declaration
public double X { get; set; }
Property Value
|
Edit this page
View Source
Y
Declaration
public double Y { get; set; }
Property Value
Methods
|
Edit this page
View Source
Equals(RelativeOffset?)
Declaration
public bool Equals(RelativeOffset? offset)
Parameters
Returns
|
Edit this page
View Source
Equals(object?)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object? obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
The object to compare with the current object.
|
Returns
| Type |
Description |
| bool |
true if the specified object is equal to the current object; otherwise, false.
|
Overrides
|
Edit this page
View Source
GetAbsoluteOffset(double, double)
Calculate the real offset respecting width and height
Declaration
public Offset GetAbsoluteOffset(double width, double height)
Parameters
| Type |
Name |
Description |
| double |
width |
Width of the symbol
|
| double |
height |
Height of the symbol
|
Returns
| Type |
Description |
| Offset |
Calculated offset
|
|
Edit this page
View Source
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
| Type |
Description |
| int |
A hash code for the current object.
|
Overrides
|
Edit this page
View Source
ToPoint()
Declaration
Returns
Operators
|
Edit this page
View Source
operator ==(RelativeOffset?, RelativeOffset?)
Declaration
public static bool operator ==(RelativeOffset? offset1, RelativeOffset? offset2)
Parameters
Returns
|
Edit this page
View Source
operator !=(RelativeOffset?, RelativeOffset?)
Declaration
public static bool operator !=(RelativeOffset? offset1, RelativeOffset? offset2)
Parameters
Returns
Extension Methods