dummydrv

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package dummydrv provides a dummy implementation of pix.Driver. It is intended to help bencharking the pix library and its drivers, providing the fastest possible implementation that real drivers can be compared to.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct {
	// contains filtered or unexported fields
}

A Driver provides a no-op implementation of pix.Driver. All its methods except SetDir does nothing. SetDir returns the rectangle set by the New function.

func New

func New(r image.Rectangle) *Driver

New returns a new Driver that simulates a display with given bounds.

func (*Driver) Draw

func (d *Driver) Draw(r image.Rectangle, src image.Image, sp image.Point, mask image.Image, mp image.Point, op draw.Op)

func (*Driver) Err

func (d *Driver) Err(clear bool) error

func (*Driver) Fill

func (d *Driver) Fill(r image.Rectangle)

func (*Driver) Flush

func (d *Driver) Flush()

func (*Driver) SetColor

func (d *Driver) SetColor(c color.Color)

func (*Driver) SetDir

func (d *Driver) SetDir(dir int) image.Rectangle

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL