A window with a canvas for pixel-based drawing. Y-coordinates are increasing downwards.
Value parameters
- background
-
the color used when clearing pixels
- foreground
-
the foreground color, default color in drawing operations
- height
-
number of vertical pixels
- title
-
the title of the window
- width
-
the number of horizontal pixels
Attributes
- Constructor
-
Create a new window for pixel-based drawing.
- Companion
- object
- Source
- PixelWindow.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
Value members
Concrete methods
Wait for next event until timeoutInMillis
milliseconds.
Wait for next event until timeoutInMillis
milliseconds.
If time is out, lastEventType
is Undefined
.
Attributes
- Source
- PixelWindow.scala
Clear all pixels using the background
class parameter.
Clear the pixel at (x, y)
using the background
class parameter.
Clear the pixel at (x, y)
using the background
class parameter.
If (x, y) is outside of window bounds then an IllegalArgumentException is thrown.
Attributes
- Source
- PixelWindow.scala
Draw img
at (x, y)
scaled to (width, height)
and rotated (angle)
radians clockwise.
Draw img
at (x, y)
scaled to (width, height)
and rotated (angle)
radians clockwise.
If angle is 0 then no rotation is applied.
Attributes
- Source
- PixelWindow.scala
Draw img
at (x, y)
unscaled.
Draw matrix
at (x, y)
unscaled.
Draw text
at (x, y)
using color
, size
, style and
fontName`.
Fill a rectangle with upper left corner at (x, y)
using color
.
Return image of PixelWindow.
Return image of PixelWindow section defined by top left corner (x, y)
and (width, height)
.
Return image of PixelWindow section defined by top left corner (x, y)
and (width, height)
.
Attributes
- Source
- PixelWindow.scala
Return the color of the pixel at (x, y)
.
Return the color of the pixel at (x, y)
.
If (x, y) is outside of window bounds then an IllegalArgumentException is thrown.
Attributes
- Source
- PixelWindow.scala
Hide the window. Has no effect if the window is already hidden.
Return true
if (x, y)
is inside windows borders else false
.
The event type of the latest event in the event queue.
The event type of the latest event in the event queue.
Returns Event.Undefined if no event has occurred. See also introprog.PixelWindow.awaitEvent
Attributes
- Source
- PixelWindow.scala
A string representing the last key pressed.
A string representing the last key pressed.
Returns an empty string if no key event has occurred.
Attributes
- Source
- PixelWindow.scala
A pair of integers with the coordinates of the last mouse event.
A pair of integers with the coordinates of the last mouse event.
Returns (-1, -1)
if no mouse event has occurred.
Attributes
- Source
- PixelWindow.scala
Draw a line from (x1
, y1
) to (x2
, y2
) using color
and lineWidth
.
Draw a line from (x1
, y1
) to (x2
, y2
) using color
and lineWidth
.
Attributes
- Source
- PixelWindow.scala
Set the color of the pixel at (x, y)
.
Set the color of the pixel at (x, y)
.
If (x, y) is outside of window bounds then an IllegalArgumentException is thrown.
Attributes
- Source
- PixelWindow.scala
Set window position on screen
Set the PixelWindow frame title.
Show the window. Has no effect if the window is already visible.
Show the window. Has no effect if the window is already visible.
Attributes
- Source
- PixelWindow.scala
Concrete fields
Attributes
- Source
- PixelWindow.scala
Attributes
- Source
- PixelWindow.scala
Attributes
- Source
- PixelWindow.scala
Attributes
- Source
- PixelWindow.scala
Attributes
- Source
- PixelWindow.scala