opengl

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 26, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package opengl implements efficient OpenGL targets and utilities for the Pixel game development library, specifically Window and Canvas.

It also contains a few additional utilities to help extend Pixel with OpenGL graphical effects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(run func())

Run is essentially the main function of PixelGL. It exists mainly due to the technical limitations of OpenGL and operating systems. In short, all graphics and window manipulating calls must be done from the main thread. Run makes this possible.

Call this function from the main function of your application. This is necessary, so that Run runs on the main thread.

func run() {
    // interact with Pixel and PixelGL from here (even concurrently)
}

func main() {
    pixel.Run(run)
}

You can spawn any number of goroutines from your run function and interact with PixelGL concurrently. The only condition is that the Run function is called from your main function.

Types

type Canvas

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

Canvas is an off-screen rectangular BasicTarget and Picture at the same time, that you can draw onto.

It supports TrianglesPosition, TrianglesColor, TrianglesPicture and PictureColor.

func NewCanvas

func NewCanvas(bounds pixel.Rect) *Canvas

NewCanvas creates a new empty, fully transparent Canvas with given bounds.

func (*Canvas) Bounds

func (c *Canvas) Bounds() pixel.Rect

Bounds returns the rectangular bounds of the Canvas.

func (*Canvas) Clear

func (c *Canvas) Clear(color color.Color)

Clear fills the whole Canvas with a single color.

func (*Canvas) Color

func (c *Canvas) Color(at pixel.Vec) pixel.RGBA

Color returns the color of the pixel over the given position inside the Canvas.

func (*Canvas) Draw

func (c *Canvas) Draw(t pixel.Target, matrix pixel.Matrix)

Draw draws the content of the Canvas onto another Target, transformed by the given Matrix, just like if it was a Sprite containing the whole Canvas.

func (*Canvas) DrawColorMask

func (c *Canvas) DrawColorMask(t pixel.Target, matrix pixel.Matrix, mask color.Color)

DrawColorMask draws the content of the Canvas onto another Target, transformed by the given Matrix and multiplied by the given mask, just like if it was a Sprite containing the whole Canvas.

If the color mask is nil, a fully opaque white mask will be used causing no effect.

func (*Canvas) Frame

func (c *Canvas) Frame() *glhf.Frame

Frame returns the underlying OpenGL Frame of this Canvas.

func (*Canvas) MakePicture

func (c *Canvas) MakePicture(p pixel.Picture) pixel.TargetPicture

MakePicture create a specialized copy of the supplied Picture that draws onto this Canvas.

PictureColor is supported.

func (*Canvas) MakeTriangles

func (c *Canvas) MakeTriangles(t pixel.Triangles) pixel.TargetTriangles

MakeTriangles creates a specialized copy of the supplied Triangles that draws onto this Canvas.

TrianglesPosition, TrianglesColor and TrianglesPicture are supported.

func (*Canvas) Pixels

func (c *Canvas) Pixels() []uint8

Pixels returns an alpha-premultiplied RGBA sequence of the content of the Canvas.

func (*Canvas) SetBounds

func (c *Canvas) SetBounds(bounds pixel.Rect)

SetBounds resizes the Canvas to the new bounds. Old content will be preserved.

func (*Canvas) SetColorMask

func (c *Canvas) SetColorMask(col color.Color)

SetColorMask sets a color that every color in triangles or a picture will be multiplied by.

func (*Canvas) SetComposeMethod

func (c *Canvas) SetComposeMethod(cmp pixel.ComposeMethod)

SetComposeMethod sets a Porter-Duff composition method to be used in the following draws onto this Canvas.

func (*Canvas) SetFragmentShader

func (c *Canvas) SetFragmentShader(src string)

SetFragmentShader allows you to set a new fragment shader on the underlying framebuffer. Argument "src" is the GLSL source, not a filename.

func (*Canvas) SetMatrix

func (c *Canvas) SetMatrix(m pixel.Matrix)

SetMatrix sets a Matrix that every point will be projected by.

func (*Canvas) SetPixels

func (c *Canvas) SetPixels(pixels []uint8)

SetPixels replaces the content of the Canvas with the provided pixels. The provided slice must be an alpha-premultiplied RGBA sequence of correct length (4 * width * height).

func (*Canvas) SetSmooth

func (c *Canvas) SetSmooth(smooth bool)

SetSmooth sets whether stretched Pictures drawn onto this Canvas should be drawn smooth or pixely.

func (*Canvas) SetUniform

func (c *Canvas) SetUniform(name string, value interface{})

SetUniform will update the named uniform with the value of any supported underlying attribute variable. If the uniform already exists, including defaults, they will be reassigned to the new value. The value can be a pointer.

func (*Canvas) Smooth

func (c *Canvas) Smooth() bool

Smooth returns whether stretched Pictures drawn onto this Canvas are set to be drawn smooth or pixely.

func (*Canvas) Texture

func (c *Canvas) Texture() *glhf.Texture

Texture returns the underlying OpenGL Texture of this Canvas.

Implements GLPicture interface.

type GLFrame

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

GLFrame is a type that helps implementing OpenGL Targets. It implements most common methods to avoid code redundancy. It contains an glhf.Frame that you can draw on.

func NewGLFrame

func NewGLFrame(bounds pixel.Rect) *GLFrame

NewGLFrame creates a new GLFrame with the given bounds.

func (*GLFrame) Bounds

func (gf *GLFrame) Bounds() pixel.Rect

Bounds returns the current GLFrame's bounds.

func (*GLFrame) Color

func (gf *GLFrame) Color(at pixel.Vec) pixel.RGBA

Color returns the color of the pixel under the specified position.

func (*GLFrame) Dirty

func (gf *GLFrame) Dirty()

Dirty marks the GLFrame as changed. Always call this method when you draw onto the GLFrame's Frame.

func (*GLFrame) Frame

func (gf *GLFrame) Frame() *glhf.Frame

Frame returns the GLFrame's Frame that you can draw on.

func (*GLFrame) SetBounds

func (gf *GLFrame) SetBounds(bounds pixel.Rect)

SetBounds resizes the GLFrame to the new bounds.

func (*GLFrame) Texture

func (gf *GLFrame) Texture() *glhf.Texture

Texture returns the underlying Texture of the GLFrame's Frame.

Implements GLPicture interface.

type GLPicture

type GLPicture interface {
	pixel.PictureColor
	Texture() *glhf.Texture
}

GLPicture is a pixel.PictureColor with a Texture. All OpenGL Targets should implement and accept this interface, because it enables seamless drawing of one to another.

Implementing this interface on an OpenGL Target enables other OpenGL Targets to efficiently draw that Target onto them.

func NewGLPicture

func NewGLPicture(p pixel.Picture) GLPicture

NewGLPicture creates a new GLPicture with it's own static OpenGL texture. This function always allocates a new texture that cannot (shouldn't) be further modified.

type GLShader

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

GLShader is a type to assist with managing a canvas's underlying shader configuration. This allows for customization of shaders on a per canvas basis.

func NewGLShader

func NewGLShader(fragmentShader string) *GLShader

NewGLShader sets up a base shader with everything needed for a Pixel canvas to render correctly. The defaults can be overridden by simply using the SetUniform function.

func (*GLShader) SetUniform

func (gs *GLShader) SetUniform(name string, value interface{})

SetUniform appends a custom uniform name and value to the shader. if the uniform already exists, it will simply be overwritten.

Example:

utime := float32(time.Since(starttime)).Seconds())
mycanvas.shader.AddUniform("u_time", &utime)

func (*GLShader) Update

func (gs *GLShader) Update()

Update reinitialize GLShader data and recompile the underlying gl shader object

type GLTriangles

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

GLTriangles are OpenGL triangles implemented using glhf.VertexSlice.

Triangles returned from this function support TrianglesPosition, TrianglesColor and TrianglesPicture. If you need to support more, you can "override" SetLen and Update methods.

func NewGLTriangles

func NewGLTriangles(shader *GLShader, t pixel.Triangles) *GLTriangles

NewGLTriangles returns GLTriangles initialized with the data from the supplied Triangles.

Only draw the Triangles using the provided Shader.

func (*GLTriangles) ClipRect

func (gt *GLTriangles) ClipRect(i int) (rect pixel.Rect, is bool)

ClipRect returns the Clipping rectangle property of the i-th vertex.

func (*GLTriangles) Color

func (gt *GLTriangles) Color(i int) pixel.RGBA

Color returns the Color property of the i-th vertex.

func (*GLTriangles) Copy

func (gt *GLTriangles) Copy() pixel.Triangles

Copy returns an independent copy of this GLTriangles.

The returned Triangles are *GLTriangles as the underlying type.

func (*GLTriangles) CopyVertices

func (gt *GLTriangles) CopyVertices()

CopyVertices copies the GLTriangle data down to the vertex data.

func (*GLTriangles) Len

func (gt *GLTriangles) Len() int

Len returns the number of vertices.

func (*GLTriangles) Picture

func (gt *GLTriangles) Picture(i int) (pic pixel.Vec, intensity float64)

Picture returns the Picture property of the i-th vertex.

func (*GLTriangles) Position

func (gt *GLTriangles) Position(i int) pixel.Vec

Position returns the Position property of the i-th vertex.

func (*GLTriangles) SetClipRect

func (gt *GLTriangles) SetClipRect(i int, rect pixel.Rect)

SetClipRect sets the Clipping rectangle property of the i-th vertex.

func (*GLTriangles) SetColor

func (gt *GLTriangles) SetColor(i int, c pixel.RGBA)

SetColor sets the color property of the i-th vertex.

func (*GLTriangles) SetLen

func (gt *GLTriangles) SetLen(length int)

SetLen efficiently resizes GLTriangles to len.

Time complexity is amortized O(1).

func (*GLTriangles) SetPicture

func (gt *GLTriangles) SetPicture(i int, pic pixel.Vec, intensity float64)

SetPicture sets the picture property of the i-th vertex.

func (*GLTriangles) SetPosition

func (gt *GLTriangles) SetPosition(i int, p pixel.Vec)

SetPosition sets the position property of the i-th vertex.

func (*GLTriangles) Shader

func (gt *GLTriangles) Shader() *GLShader

Shader returns the GLTriangles's associated shader.

func (*GLTriangles) Slice

func (gt *GLTriangles) Slice(i, j int) pixel.Triangles

Slice returns a sub-Triangles of this GLTriangles in range [i, j).

func (*GLTriangles) Update

func (gt *GLTriangles) Update(t pixel.Triangles)

Update copies vertex properties from the supplied Triangles into this GLTriangles.

The two Triangles (gt and t) must be of the same len.

func (*GLTriangles) VertexSlice

func (gt *GLTriangles) VertexSlice() *glhf.VertexSlice

VertexSlice returns the VertexSlice of this GLTriangles.

You can use it to draw them.

type Monitor

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

Monitor represents a physical display attached to your computer.

func Monitors

func Monitors() []*Monitor

Monitors returns a slice of all currently available monitors.

func PrimaryMonitor

func PrimaryMonitor() *Monitor

PrimaryMonitor returns the main monitor (usually the one with the taskbar and stuff).

func (*Monitor) BitDepth

func (m *Monitor) BitDepth() (red, green, blue int)

BitDepth returns the number of bits per color of the Monitor.

func (*Monitor) Name

func (m *Monitor) Name() string

Name returns a human-readable name of the Monitor.

func (*Monitor) PhysicalSize

func (m *Monitor) PhysicalSize() (width, height float64)

PhysicalSize returns the size of the display area of the Monitor in millimeters.

func (*Monitor) Position

func (m *Monitor) Position() (x, y float64)

Position returns the position of the upper-left corner of the Monitor in screen coordinates.

func (*Monitor) RefreshRate

func (m *Monitor) RefreshRate() (rate float64)

RefreshRate returns the refresh frequency of the Monitor in Hz (refreshes/second).

func (*Monitor) Size

func (m *Monitor) Size() (width, height float64)

Size returns the resolution of the Monitor in pixels.

func (*Monitor) VideoModes

func (m *Monitor) VideoModes() (vmodes []VideoMode)

VideoModes returns all available video modes for the monitor.

type VideoMode

type VideoMode struct {
	// Width is the width of the vide mode in pixels.
	Width int
	// Height is the height of the video mode in pixels.
	Height int
	// RefreshRate holds the refresh rate of the associated monitor in Hz.
	RefreshRate int
}

VideoMode represents all properties of a video mode and is associated with a monitor if it is used in fullscreen mode.

type Window

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

Window is a window handler. Use this type to manipulate a window (input, drawing, etc.).

func NewWindow

func NewWindow(cfg WindowConfig) (*Window, error)

NewWindow creates a new Window with it's properties specified in the provided config.

If Window creation fails, an error is returned (e.g. due to unavailable graphics device).

func (*Window) Bounds

func (w *Window) Bounds() pixel.Rect

Bounds returns the current bounds of the Window.

func (*Window) Canvas

func (w *Window) Canvas() *Canvas

Canvas returns the window's underlying Canvas

func (*Window) Clear

func (w *Window) Clear(c color.Color)

Clear clears the Window with a single color.

func (*Window) Clipboard

func (w *Window) Clipboard() string

Clipboard returns the contents of the system clipboard.

func (*Window) ClipboardText

func (w *Window) ClipboardText() string

ClipboardText returns the current value of the systems clipboard.

func (*Window) Closed

func (w *Window) Closed() bool

Closed returns the closed flag of the Window, which reports whether the Window should be closed.

The closed flag is automatically set when a user attempts to close the Window.

func (*Window) Color

func (w *Window) Color(at pixel.Vec) pixel.RGBA

Color returns the color of the pixel over the given position inside the Window.

func (*Window) CursorVisible

func (w *Window) CursorVisible() bool

CursorVisible returns the visibility status of the mouse cursor.

func (*Window) Destroy

func (w *Window) Destroy()

Destroy destroys the Window. The Window can't be used any further.

func (*Window) Focus

func (w *Window) Focus()

Focus makes the window focused, brings the specified window to front and sets input focus. The window should already be visible and not iconified.

func (*Window) Focused

func (w *Window) Focused() bool

Focused returns true if the Window has input focus.

func (*Window) GetPos

func (w *Window) GetPos() pixel.Vec

GetPos gets the position, in screen coordinates, of the upper-left corner of the client area of the window. The position is rounded to integers.

func (*Window) Hide

func (w *Window) Hide()

func (*Window) JoystickAxis

func (w *Window) JoystickAxis(js pixel.Joystick, axis pixel.GamepadAxis) float64

JoystickAxis returns the value of a joystick axis at the last call to Window.Update. If the axis index is out of range, this will return 0.

This API is experimental.

func (*Window) JoystickAxisCount

func (w *Window) JoystickAxisCount(js pixel.Joystick) int

JoystickAxisCount returns the number of axes a connected joystick has.

This API is experimental.

func (*Window) JoystickButtonCount

func (w *Window) JoystickButtonCount(js pixel.Joystick) int

JoystickButtonCount returns the number of buttons a connected joystick has.

This API is experimental.

func (*Window) JoystickJustPressed

func (w *Window) JoystickJustPressed(js pixel.Joystick, button pixel.GamepadButton) bool

JoystickJustPressed returns whether the joystick Button has just been pressed down. If the button index is out of range, this will return false.

This API is experimental.

func (*Window) JoystickJustReleased

func (w *Window) JoystickJustReleased(js pixel.Joystick, button pixel.GamepadButton) bool

JoystickJustReleased returns whether the joystick Button has just been released up. If the button index is out of range, this will return false.

This API is experimental.

func (*Window) JoystickName

func (w *Window) JoystickName(js pixel.Joystick) string

JoystickName returns the name of the joystick. A disconnected joystick will return an empty string.

This API is experimental.

func (*Window) JoystickPresent

func (w *Window) JoystickPresent(js pixel.Joystick) bool

JoystickPresent returns if the joystick is currently connected.

This API is experimental.

func (*Window) JoystickPressed

func (w *Window) JoystickPressed(js pixel.Joystick, button pixel.GamepadButton) bool

JoystickPressed returns whether the joystick Button is currently pressed down. If the button index is out of range, this will return false.

This API is experimental.

func (*Window) JustPressed

func (w *Window) JustPressed(button pixel.Button) bool

JustPressed returns whether the Button has been pressed in the last frame.

func (*Window) JustReleased

func (w *Window) JustReleased(button pixel.Button) bool

JustReleased returns whether the Button has been released in the last frame.

func (*Window) MakePicture

func (w *Window) MakePicture(p pixel.Picture) pixel.TargetPicture

MakePicture generates a specialized copy of the supplied Picture that will draw onto this Window.

Window supports PictureColor.

func (*Window) MakeTriangles

func (w *Window) MakeTriangles(t pixel.Triangles) pixel.TargetTriangles

MakeTriangles generates a specialized copy of the supplied Triangles that will draw onto this Window.

Window supports TrianglesPosition, TrianglesColor and TrianglesPicture.

func (*Window) Monitor

func (w *Window) Monitor() *Monitor

Monitor returns a monitor the Window is fullscreen on. If the Window is not fullscreen, this function returns nil.

func (*Window) MouseInsideWindow

func (w *Window) MouseInsideWindow() bool

MouseInsideWindow returns true if the mouse position is within the Window's Bounds.

func (*Window) MousePosition

func (w *Window) MousePosition() pixel.Vec

MousePosition returns the current mouse position in the Window's Bounds.

func (*Window) MousePreviousPosition

func (w *Window) MousePreviousPosition() pixel.Vec

MousePreviousPosition returns the previous mouse position in the Window's Bounds.

func (*Window) MousePreviousScroll

func (w *Window) MousePreviousScroll() pixel.Vec

func (*Window) MouseScroll

func (w *Window) MouseScroll() pixel.Vec

MouseScroll returns the mouse scroll amount (in both axes) since the last call to Window.Update.

func (*Window) Pressed

func (w *Window) Pressed(button pixel.Button) bool

Pressed returns whether the Button is currently pressed down.

func (*Window) Repeated

func (w *Window) Repeated(button pixel.Button) bool

Repeated returns whether a repeat event has been triggered on button.

Repeat event occurs repeatedly when a button is held down for some time.

func (*Window) SetBounds

func (w *Window) SetBounds(bounds pixel.Rect)

SetBounds sets the bounds of the Window in pixels. Bounds can be fractional, but the actual size of the window will be rounded to integers.

func (*Window) SetClipboard

func (w *Window) SetClipboard(str string)

SetClipboard sets the system clipboard to the specified UTF-8 encoded string.

func (*Window) SetClipboardText

func (w *Window) SetClipboardText(text string)

SetClipboardText passes the given string to the underlying glfw window to set the systems clipboard.

func (*Window) SetClosed

func (w *Window) SetClosed(closed bool)

SetClosed sets the closed flag of the Window.

This is useful when overriding the user's attempt to close the Window, or just to close the Window from within the program.

func (*Window) SetColorMask

func (w *Window) SetColorMask(c color.Color)

SetColorMask sets a global color mask for the Window.

func (*Window) SetComposeMethod

func (w *Window) SetComposeMethod(cmp pixel.ComposeMethod)

SetComposeMethod sets a Porter-Duff composition method to be used in the following draws onto this Window.

func (*Window) SetCursorDisabled

func (w *Window) SetCursorDisabled()

SetCursorDisabled hides the cursor and provides unlimited virtual cursor movement make cursor visible using SetCursorVisible

func (*Window) SetCursorVisible

func (w *Window) SetCursorVisible(visible bool)

SetCursorVisible sets the visibility of the mouse cursor inside the Window client area.

func (*Window) SetMatrix

func (w *Window) SetMatrix(m pixel.Matrix)

SetMatrix sets a Matrix that every point will be projected by.

func (*Window) SetMonitor

func (w *Window) SetMonitor(monitor *Monitor)

SetMonitor sets the Window fullscreen on the given Monitor. If the Monitor is nil, the Window will be restored to windowed state instead.

The Window will be automatically set to the Monitor's resolution. If you want a different resolution, you will need to set it manually with SetBounds method.

func (*Window) SetMousePosition

func (w *Window) SetMousePosition(v pixel.Vec)

SetMousePosition positions the mouse cursor anywhere within the Window's Bounds.

func (*Window) SetPos

func (w *Window) SetPos(pos pixel.Vec)

SetPos sets the position, in screen coordinates, of the upper-left corner of the client area of the window. Position can be fractional, but the actual position of the window will be rounded to integers.

If it is a full screen window, this function does nothing.

func (*Window) SetSmooth

func (w *Window) SetSmooth(smooth bool)

SetSmooth sets whether the stretched Pictures drawn onto this Window should be drawn smooth or pixely.

func (*Window) SetTitle

func (w *Window) SetTitle(title string)

SetTitle changes the title of the Window.

func (*Window) SetVSync

func (w *Window) SetVSync(vsync bool)

SetVSync sets whether the Window's Update should synchronize with the monitor refresh rate.

func (*Window) Show

func (w *Window) Show()

Show makes the window visible, if it was previously hidden. If the window is already visible or is in full screen mode, this function does nothing.

func (*Window) Smooth

func (w *Window) Smooth() bool

Smooth returns whether the stretched Pictures drawn onto this Window are set to be drawn smooth or pixely.

func (*Window) SwapBuffers

func (w *Window) SwapBuffers()

SwapBuffers swaps buffers. Call this to swap buffers without polling window events. Note that Update invokes SwapBuffers.

func (*Window) Typed

func (w *Window) Typed() string

Typed returns the text typed on the keyboard since the last call to Window.Update.

func (*Window) Update

func (w *Window) Update()

Update swaps buffers and polls events. Call this method at the end of each frame.

func (*Window) UpdateInput

func (w *Window) UpdateInput()

UpdateInput polls window events. Call this function to poll window events without swapping buffers. Note that the Update method invokes UpdateInput.

func (*Window) UpdateInputWait

func (w *Window) UpdateInputWait(timeout time.Duration)

UpdateInputWait blocks until an event is received or a timeout. If timeout is 0 then it will wait indefinitely

func (*Window) VSync

func (w *Window) VSync() bool

VSync returns whether the Window is set to synchronize with the monitor refresh rate.

type WindowConfig

type WindowConfig struct {
	// Title at the top of the Window.
	Title string

	// Icon specifies the icon images available to be used by the window. This is usually
	// displayed in the top bar of the window or in the task bar of the desktop environment.
	//
	// If passed one image, it will use that image, if passed an array of images those of or
	// closest to the sizes desired by the system are selected. The desired image sizes varies
	// depending on platform and system settings. The selected images will be rescaled as
	// needed. Good sizes include 16x16, 32x32 and 48x48.
	//
	// Note: Setting this value doesn't have an effect on OSX. You'll need to set the icon when
	// bundling your application for release.
	Icon []pixel.Picture

	// Bounds specify the bounds of the Window in pixels.
	Bounds pixel.Rect

	// Initial window position
	Position pixel.Vec

	// If set to nil, the Window will be windowed. Otherwise it will be fullscreen on the
	// specified Monitor.
	Monitor *Monitor

	// Resizable specifies whether the window will be resizable by the user.
	Resizable bool

	// Undecorated Window omits the borders and decorations (close button, etc.).
	Undecorated bool

	// NoIconify specifies whether fullscreen windows should not automatically
	// iconify (and restore the previous video mode) on focus loss.
	NoIconify bool

	// AlwaysOnTop specifies whether the windowed mode window will be floating
	// above other regular windows, also called topmost or always-on-top.
	// This is intended primarily for debugging purposes and cannot be used to
	// implement proper full screen windows.
	AlwaysOnTop bool

	// TransparentFramebuffer specifies whether the window framebuffer will be
	// transparent. If enabled and supported by the system, the window
	// framebuffer alpha channel will be used to combine the framebuffer with
	// the background. This does not affect window decorations.
	TransparentFramebuffer bool

	// VSync (vertical synchronization) synchronizes Window's framerate with the framerate of
	// the monitor.
	VSync bool

	// Maximized specifies whether the window is maximized.
	Maximized bool

	// Invisible specifies whether the window will be initially hidden.
	// You can make the window visible later using Window.Show().
	Invisible bool

	//SamplesMSAA specifies the level of MSAA to be used. Must be one of 0, 2, 4, 8, 16. 0 to disable.
	SamplesMSAA int
}

WindowConfig is a structure for specifying all possible properties of a Window. Properties are chosen in such a way, that you usually only need to set a few of them - defaults (zeros) should usually be sensible.

Note that you always need to set the Bounds of a Window.

Jump to

Keyboard shortcuts

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