Interface IEPaperDisplay
Represents an ePaper Display device.
public interface IEPaperDisplay
Properties
FrameBuffer
Gets the frame buffer.
IFrameBuffer FrameBuffer { get; }
Property Value
Remarks
This frame buffer instance could be pointing to a portion of the full display frame as a measure to reduce memory footprint. See the ctor documentation for more info.
Height
Gets the height of the drawable area on the display.
int Height { get; }
Property Value
PagedFrameDrawEnabled
Gets a value indicating whether drawing to a frame is paged to save on memory space.
bool PagedFrameDrawEnabled { get; }
Property Value
Width
Gets the width of the drawable area on the display.
int Width { get; }
Property Value
Methods
BeginFrameDraw()
Begins a frame draw operation with frame paging support.
BeginFrameDraw();
do {
// Drawing calls
} while (NextFramePage());
EndFrameDraw();
void BeginFrameDraw()
Clear(bool)
Clears the display frame buffer by resetting it to its default state.
void Clear(bool triggerPageRefresh = false)
Parameters
triggerPageRefreshbooltrue to also flush the buffer to the display and trigger the refresh sequence.
DrawPixel(int, int, Color)
Draws a single pixel to the appropriate frame buffer based on the specified color.
void DrawPixel(int x, int y, Color color)
Parameters
xintThe X Position.
yintThe Y Position.
colorColorPixel color. See the remarks for how a buffer is selected based on the color value.
EndFrameDraw()
Ends the frame draw and flushes the current page to the device.
void EndFrameDraw()
Flush()
Flushes the content of the internal frame buffer to the display.
void Flush()
Remarks
You will only need to use this method if you have disabled frame paged draws.
NextFramePage()
Moves the current buffers to the next frame page and returns true if successful.
bool NextFramePage()
Returns
- bool
True if the next frame page is available and the internal buffers have moved to it, false otherwise.
PerformFullRefresh()
Initiates the full refresh sequence on the display.
bool PerformFullRefresh()
Returns
- bool
True if the screen sucessfully refresh. False otherwise (still busy after a predefined waiting time).
PerformPartialRefresh()
Initiates the partial refresh sequence on the display if the panel supports it.
bool PerformPartialRefresh()
Returns
- bool
True if the screen sucessfully refresh. False otherwise (still busy after a predefined waiting time).
SendCommand(params byte[])
Sends a command byte(s) to the display.
void SendCommand(params byte[] command)
Parameters
commandbyte[]The command bytes to send. See the command enum within the driver implementation and consult the datasheet.
SendData(params byte[])
Send frame data to the display.
void SendData(params byte[] data)
Parameters
databyte[]The frame data to send.
SendData(params ushort[])
Send frame data to the display.
void SendData(params ushort[] data)
Parameters
dataushort[]The frame data to send.
SetPosition(int, int)
Sets the drawing position on the display.
void SetPosition(int x, int y)
Parameters
WaitReady(CancellationToken)
Blocks the current thread until the display is in idle mode again.
bool WaitReady(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenThe CancellationToken to be able to cancel the waiting time.
Returns
- bool
True if it returns before the CancellationToken expires, false otherwise.
Remarks
If cancellationToken is null, this method will block until the busy pin is low.