ScottPlot
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Properties | List of all members
ScottPlot.Pixel Struct Reference

Represents an X/Y location on screen in pixel units. Pixels in screen units are distinct from Coordinates with axis units. Pixels use float precision, whereas Coordinates use double precision. More...

Inheritance diagram for ScottPlot.Pixel:
IEquatable

Public Member Functions

 Pixel (float x, float y)
 Create a pixel, casting double values into ones with float precision.
 
 Pixel (double x, double y)
 Create a pixel, casting double values into ones with float precision.
 
override string ToString ()
 
SKPoint ToSKPoint ()
 Convert the ScottPlot pixel to a SkiaSharp point.
 
bool Equals (Pixel other)
 
override bool Equals (object? obj)
 
override int GetHashCode ()
 
readonly float DistanceFrom (Pixel px2)
 
readonly Pixel WithOffset (float dX, float dY)
 
readonly Pixel WithOffset (PixelOffset offset)
 
readonly Pixel MovedRight (float dX)
 
readonly Pixel MovedLeft (float dX)
 
readonly Pixel MovedUp (float dY)
 
readonly Pixel MovedDown (float dY)
 
readonly Pixel Divide (float v)
 
readonly Pixel Divide (float x, float y)
 
readonly Pixel Multiply (float v)
 
readonly Pixel Multiply (float x, float y)
 

Static Public Member Functions

static bool operator== (Pixel a, Pixel b)
 
static bool operator!= (Pixel a, Pixel b)
 
static Pixel operator+ (Pixel a, Pixel b)
 
static Pixel operator- (Pixel a, Pixel b)
 
static Pixel operator* (Pixel a, float b)
 
static Pixel operator/ (Pixel a, float b)
 

Public Attributes

float X
 Horizontal position on the screen in pixel units. Larger numbers are farther right on the screen.
 
float Y
 Vertical position on the screen in pixel units. Larger numbers are lower on the screen.
 

Properties

static Pixel NaN [get]
 Represents an invalid pixel location.
 
static Pixel Zero [get]
 

Detailed Description

Represents an X/Y location on screen in pixel units. Pixels in screen units are distinct from Coordinates with axis units. Pixels use float precision, whereas Coordinates use double precision.

Constructor & Destructor Documentation

◆ Pixel() [1/2]

ScottPlot.Pixel.Pixel ( float  x,
float  y 
)
inline

Create a pixel, casting double values into ones with float precision.

◆ Pixel() [2/2]

ScottPlot.Pixel.Pixel ( double  x,
double  y 
)
inline

Create a pixel, casting double values into ones with float precision.

Member Function Documentation

◆ DistanceFrom()

readonly float ScottPlot.Pixel.DistanceFrom ( Pixel  px2)
inline

◆ Divide() [1/2]

readonly Pixel ScottPlot.Pixel.Divide ( float  v)

◆ Divide() [2/2]

readonly Pixel ScottPlot.Pixel.Divide ( float  x,
float  y 
)

◆ Equals() [1/2]

override bool ScottPlot.Pixel.Equals ( object?  obj)
inline

◆ Equals() [2/2]

bool ScottPlot.Pixel.Equals ( Pixel  other)
inline

◆ GetHashCode()

override int ScottPlot.Pixel.GetHashCode ( )
inline

◆ MovedDown()

readonly Pixel ScottPlot.Pixel.MovedDown ( float  dY)
inline

◆ MovedLeft()

readonly Pixel ScottPlot.Pixel.MovedLeft ( float  dX)
inline

◆ MovedRight()

readonly Pixel ScottPlot.Pixel.MovedRight ( float  dX)
inline

◆ MovedUp()

readonly Pixel ScottPlot.Pixel.MovedUp ( float  dY)
inline

◆ Multiply() [1/2]

readonly Pixel ScottPlot.Pixel.Multiply ( float  v)

◆ Multiply() [2/2]

readonly Pixel ScottPlot.Pixel.Multiply ( float  x,
float  y 
)

◆ operator!=()

static bool ScottPlot.Pixel.operator!= ( Pixel  a,
Pixel  b 
)
inlinestatic

◆ operator*()

static Pixel ScottPlot.Pixel.operator* ( Pixel  a,
float  b 
)
inlinestatic

◆ operator+()

static Pixel ScottPlot.Pixel.operator+ ( Pixel  a,
Pixel  b 
)
inlinestatic

◆ operator-()

static Pixel ScottPlot.Pixel.operator- ( Pixel  a,
Pixel  b 
)
inlinestatic

◆ operator/()

static Pixel ScottPlot.Pixel.operator/ ( Pixel  a,
float  b 
)
inlinestatic

◆ operator==()

static bool ScottPlot.Pixel.operator== ( Pixel  a,
Pixel  b 
)
inlinestatic

◆ ToSKPoint()

SKPoint ScottPlot.Pixel.ToSKPoint ( )
inline

Convert the ScottPlot pixel to a SkiaSharp point.

◆ ToString()

override string ScottPlot.Pixel.ToString ( )
inline

◆ WithOffset() [1/2]

readonly Pixel ScottPlot.Pixel.WithOffset ( float  dX,
float  dY 
)
inline

◆ WithOffset() [2/2]

readonly Pixel ScottPlot.Pixel.WithOffset ( PixelOffset  offset)
inline

Member Data Documentation

◆ X

float ScottPlot.Pixel.X

Horizontal position on the screen in pixel units. Larger numbers are farther right on the screen.

◆ Y

float ScottPlot.Pixel.Y

Vertical position on the screen in pixel units. Larger numbers are lower on the screen.

Property Documentation

◆ NaN

Pixel ScottPlot.Pixel.NaN
staticget

Represents an invalid pixel location.

◆ Zero

Pixel ScottPlot.Pixel.Zero
staticget

The documentation for this struct was generated from the following file: