stimuli

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Package stimuli provides visual and auditory stimulus types (fixation cross, text, pictures, video, shapes, sound, etc.) that implement the Stimulus and VisualStimulus interfaces for use with the experiment Screen.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PlayBuzzer added in v0.1.1

func PlayBuzzer(audioDevice sdl.AudioDeviceID) error

PlayBuzzer plays the embedded buzzer sound synchronously on the given audio device.

func PlayPing added in v0.1.1

func PlayPing(audioDevice sdl.AudioDeviceID) error

PlayPing plays the embedded "correct" ping sound synchronously on the given audio device.

func PlaySoundFromMemory

func PlaySoundFromMemory(audioDevice sdl.AudioDeviceID, data []byte) error

PlaySoundFromMemory is a helper to play a sound from a byte slice on a given audio device in the background.

func PreloadAllVisual added in v0.1.1

func PreloadAllVisual(screen *io.Screen, visuals []VisualStimulus) error

PreloadAllVisual preloads a slice of visual stimuli on the given screen.

func PreloadVisualOnScreen added in v0.1.1

func PreloadVisualOnScreen(screen *io.Screen, v VisualStimulus) error

PreloadVisualOnScreen attempts to preload GPU resources for a visual stimulus on the given screen without presenting it. For known stimulus types it calls their internal preload routines; for others it falls back to calling Draw, which will lazily allocate textures without updating the screen contents.

Types

type BlankScreen

type BlankScreen struct {
	Color sdl.Color
}

BlankScreen is a full-screen filled rectangle of one color (e.g. for inter-trial intervals).

func NewBlankScreen

func NewBlankScreen(color sdl.Color) *BlankScreen

NewBlankScreen creates a blank screen that draws the given color over the full screen.

func (*BlankScreen) Draw

func (b *BlankScreen) Draw(screen *io.Screen) error

func (*BlankScreen) GetPosition

func (b *BlankScreen) GetPosition() sdl.FPoint

func (*BlankScreen) Preload

func (b *BlankScreen) Preload() error

func (*BlankScreen) Present

func (b *BlankScreen) Present(screen *io.Screen, clear, update bool) error

func (*BlankScreen) SetPosition

func (b *BlankScreen) SetPosition(pos sdl.FPoint)

func (*BlankScreen) Unload

func (b *BlankScreen) Unload() error

type Canvas

type Canvas struct {
	Size     sdl.FPoint
	Position sdl.FPoint
	Color    sdl.Color
	Texture  *sdl.Texture
}

Canvas is an offscreen render target of the given size and background color; stimuli can be drawn to it, then the canvas is drawn to the screen.

func NewCanvas

func NewCanvas(width, height float32, color sdl.Color) *Canvas

NewCanvas creates a canvas with the given width, height, and background color (center at 0,0).

func (*Canvas) Blit

func (c *Canvas) Blit(stim VisualStimulus, screen *io.Screen) error

Blit draws a stimulus onto the canvas.

func (*Canvas) Clear

func (c *Canvas) Clear(screen *io.Screen) error

Clear clears the canvas with its background color.

func (*Canvas) Draw

func (c *Canvas) Draw(screen *io.Screen) error

func (*Canvas) GetPosition

func (c *Canvas) GetPosition() sdl.FPoint

func (*Canvas) Preload

func (c *Canvas) Preload() error

func (*Canvas) Present

func (c *Canvas) Present(screen *io.Screen, clear, update bool) error

func (*Canvas) SetPosition

func (c *Canvas) SetPosition(pos sdl.FPoint)

func (*Canvas) Unload

func (c *Canvas) Unload() error

type Circle

type Circle struct {
	Radius   float32
	Position sdl.FPoint
	Color    sdl.Color
	Texture  *sdl.Texture
}

Circle is a filled circle with the given radius and color; Position is center-based.

func NewCircle

func NewCircle(radius float32, color sdl.Color) *Circle

NewCircle creates a new Circle stimulus.

func (*Circle) Draw

func (c *Circle) Draw(screen *io.Screen) error

Draw draws the circle using multiple lines or points. For better performance, we could use a texture.

func (*Circle) GetPosition

func (c *Circle) GetPosition() sdl.FPoint

func (*Circle) InsideCircle

func (c *Circle) InsideCircle(areaRadius float32, areaPos sdl.FPoint) bool

InsideCircle checks if the circle is inside another circle (area).

func (*Circle) Preload

func (c *Circle) Preload() error

func (*Circle) Present

func (c *Circle) Present(screen *io.Screen, clear, update bool) error

func (*Circle) SetPosition

func (c *Circle) SetPosition(pos sdl.FPoint)

func (*Circle) Unload

func (c *Circle) Unload() error

type DotCloud

type DotCloud struct {
	Radius          float32
	Position        sdl.FPoint
	BackgroundColor sdl.Color
	DotColor        sdl.Color
	Dots            []*Circle
}

DotCloud represents a circular cloud of dots.

func NewDotCloud

func NewDotCloud(radius float32, bgColor, dotColor sdl.Color) *DotCloud

NewDotCloud creates a new DotCloud.

func (*DotCloud) Draw

func (dc *DotCloud) Draw(screen *io.Screen) error

Draw draws all the dots and the background if specified.

func (*DotCloud) GetPosition

func (dc *DotCloud) GetPosition() sdl.FPoint

func (*DotCloud) Make

func (dc *DotCloud) Make(nDots int, dotRadius float32, gap float32) bool

Make generates the dots randomly within the cloud.

func (*DotCloud) Preload

func (dc *DotCloud) Preload() error

func (*DotCloud) Present

func (dc *DotCloud) Present(screen *io.Screen, clear, update bool) error

Present clears and draws the cloud.

func (*DotCloud) SetPosition

func (dc *DotCloud) SetPosition(pos sdl.FPoint)

func (*DotCloud) Unload

func (dc *DotCloud) Unload() error

type FixCross

type FixCross struct {
	Size      float32
	LineWidth float32
	Color     sdl.Color
	Position  sdl.FPoint
}

FixCross is a centered fixation cross (horizontal and vertical lines). Position is in center-based coordinates; Size and LineWidth are in the same units.

func NewFixCross

func NewFixCross(size float32, lineWidth float32, color sdl.Color) *FixCross

NewFixCross creates a fixation cross with the given size, line width, and color (center at 0,0).

func (*FixCross) Draw

func (f *FixCross) Draw(screen *io.Screen) error

func (*FixCross) GetPosition

func (f *FixCross) GetPosition() sdl.FPoint

func (*FixCross) Preload

func (f *FixCross) Preload() error

func (*FixCross) Present

func (f *FixCross) Present(screen *io.Screen, clear, update bool) error

func (*FixCross) SetPosition

func (f *FixCross) SetPosition(pos sdl.FPoint)

func (*FixCross) Unload

func (f *FixCross) Unload() error

type GaborPatch

type GaborPatch struct {
	Sigma           float64
	Theta           float64 // orientation in degrees
	Lambda          float64 // spatial frequency
	Phase           float64
	Psi             float64
	Gamma           float64
	BackgroundColor sdl.Color
	Position        sdl.FPoint
	Size            float32
	Texture         *sdl.Texture
}

GaborPatch is a Gabor patch (sinusoidal grating windowed by a Gaussian) with orientation, spatial frequency, phase, and size parameters.

func NewGaborPatch

func NewGaborPatch(sigma, theta, lambda, phase, psi, gamma float64, bgColor sdl.Color, size float32) *GaborPatch

NewGaborPatch creates a Gabor patch with the given sigma, theta (degrees), lambda, phase, psi, gamma, background color, and size in pixels.

func (*GaborPatch) Draw

func (gp *GaborPatch) Draw(screen *io.Screen) error

func (*GaborPatch) GetPosition

func (gp *GaborPatch) GetPosition() sdl.FPoint

func (*GaborPatch) Preload

func (gp *GaborPatch) Preload() error

func (*GaborPatch) Present

func (gp *GaborPatch) Present(screen *io.Screen, clear, update bool) error

func (*GaborPatch) SetPosition

func (gp *GaborPatch) SetPosition(pos sdl.FPoint)

func (*GaborPatch) Unload

func (gp *GaborPatch) Unload() error

type Line

type Line struct {
	Start     sdl.FPoint
	End       sdl.FPoint
	Color     sdl.Color
	LineWidth float32
}

Line is a line segment from Start to End in center-based coordinates, with the given color and line width.

func NewLine

func NewLine(start, end sdl.FPoint, color sdl.Color, lineWidth float32) *Line

NewLine creates a new Line stimulus relative to center.

func (*Line) Draw

func (l *Line) Draw(screen *io.Screen) error

func (*Line) GetPosition

func (l *Line) GetPosition() sdl.FPoint

func (*Line) Preload

func (l *Line) Preload() error

func (*Line) Present

func (l *Line) Present(screen *io.Screen, clear, update bool) error

func (*Line) SetPosition

func (l *Line) SetPosition(pos sdl.FPoint)

func (*Line) Unload

func (l *Line) Unload() error

type Picture

type Picture struct {
	FilePath string
	Memory   []byte
	Position sdl.FPoint
	Texture  *sdl.Texture
	Width    float32
	Height   float32
}

Picture is an image stimulus loaded from a file path or from memory (e.g. embedded data).

func NewPicture

func NewPicture(filePath string, x, y float32) *Picture

NewPicture creates a picture stimulus from a file path, with center position (x, y).

func NewPictureFromMemory

func NewPictureFromMemory(data []byte, x, y float32) *Picture

NewPictureFromMemory creates a new Picture stimulus from embedded data.

func (*Picture) Draw

func (p *Picture) Draw(screen *io.Screen) error

func (*Picture) GetPosition

func (p *Picture) GetPosition() sdl.FPoint

func (*Picture) Preload

func (p *Picture) Preload() error

func (*Picture) Present

func (p *Picture) Present(screen *io.Screen, clear, update bool) error

func (*Picture) SetPosition

func (p *Picture) SetPosition(pos sdl.FPoint)

func (*Picture) Unload

func (p *Picture) Unload() error

type Rectangle

type Rectangle struct {
	Position sdl.FPoint
	Rect     sdl.FRect
	Color    sdl.Color
}

Rectangle is a filled rectangle with center at (x,y) and size (w,h) in center-based coordinates.

func NewRectangle

func NewRectangle(x, y, w, h float32, color sdl.Color) *Rectangle

NewRectangle creates a rectangle centered at (x, y) with width w, height h, and the given color.

func (*Rectangle) Draw

func (r *Rectangle) Draw(screen *io.Screen) error

func (*Rectangle) GetPosition

func (r *Rectangle) GetPosition() sdl.FPoint

func (*Rectangle) Preload

func (r *Rectangle) Preload() error

func (*Rectangle) Present

func (r *Rectangle) Present(screen *io.Screen, clear, update bool) error

func (*Rectangle) SetPosition

func (r *Rectangle) SetPosition(pos sdl.FPoint)

func (*Rectangle) Unload

func (r *Rectangle) Unload() error

type Shape

type Shape struct {
	Points   []sdl.FPoint
	Position sdl.FPoint
	Color    sdl.Color
}

Shape is a filled polygon defined by Points (relative to the shape center) and a single color.

func NewShape

func NewShape(points []sdl.FPoint, color sdl.Color) *Shape

NewShape creates a new polygon shape. Points are relative to the shape's center.

func (*Shape) Draw

func (s *Shape) Draw(screen *io.Screen) error

func (*Shape) GetPosition

func (s *Shape) GetPosition() sdl.FPoint

func (*Shape) Preload

func (s *Shape) Preload() error

func (*Shape) Present

func (s *Shape) Present(screen *io.Screen, clear, update bool) error

func (*Shape) SetPosition

func (s *Shape) SetPosition(pos sdl.FPoint)

func (*Shape) Unload

func (s *Shape) Unload() error

type Sound

type Sound struct {
	FilePath string
	Memory   []byte
	Data     []byte
	Spec     sdl.AudioSpec
	Stream   *sdl.AudioStream
}

Sound represents an audio stimulus (WAV).

func NewSound

func NewSound(filePath string) *Sound

NewSound creates a new Sound stimulus from a WAV file.

func NewSoundFromMemory

func NewSoundFromMemory(data []byte) *Sound

NewSoundFromMemory creates a new Sound stimulus from embedded data.

func (*Sound) Play

func (s *Sound) Play() error

Play plays the sound.

func (*Sound) Preload

func (s *Sound) Preload() error

func (*Sound) PreloadDevice

func (s *Sound) PreloadDevice(audioDevice sdl.AudioDeviceID) error

PreloadDevice loads the WAV file and prepares the audio stream.

func (*Sound) Present

func (s *Sound) Present(screen *io.Screen, clear, update bool) error

Present plays the sound (implements Stimulus interface).

func (*Sound) Unload

func (s *Sound) Unload() error

func (*Sound) Wait added in v0.1.1

func (s *Sound) Wait()

Wait blocks until the sound has finished playing.

type Stimulus

type Stimulus interface {
	Present(screen *io.Screen, clear, update bool) error
	Preload() error
	Unload() error
}

Stimulus is the interface for all visual and auditory stimuli.

type StimulusCircle

type StimulusCircle struct {
	Radius   float32
	Stimuli  []VisualStimulus
	Position sdl.FPoint
}

StimulusCircle represents a collection of stimuli arranged in a circle.

func NewStimulusCircle

func NewStimulusCircle(radius float32, stimuli []VisualStimulus) *StimulusCircle

NewStimulusCircle creates a new StimulusCircle.

func (*StimulusCircle) Draw

func (sc *StimulusCircle) Draw(screen *io.Screen) error

Draw draws all stimuli in the circle.

func (*StimulusCircle) GetPosition

func (sc *StimulusCircle) GetPosition() sdl.FPoint

func (*StimulusCircle) Make

func (sc *StimulusCircle) Make(shuffle bool, jitter bool)

Make arranges the stimuli in a circle.

func (*StimulusCircle) Preload

func (sc *StimulusCircle) Preload() error

func (*StimulusCircle) Present

func (sc *StimulusCircle) Present(screen *io.Screen, clear, update bool) error

Present clears and draws the circle.

func (*StimulusCircle) SetPosition

func (sc *StimulusCircle) SetPosition(pos sdl.FPoint)

func (*StimulusCircle) Unload

func (sc *StimulusCircle) Unload() error

type TextBox

type TextBox struct {
	Text      string
	BoxWidth  int32
	Position  sdl.FPoint
	Color     sdl.Color
	Alignment ttf.HorizontalAlignment
	Font      *ttf.Font
	Texture   *sdl.Texture
	Width     float32
	Height    float32
}

TextBox represents a multi-line text box with wrapping and alignment.

func NewTextBox

func NewTextBox(text string, boxWidth int32, position sdl.FPoint, color sdl.Color) *TextBox

NewTextBox creates a multi-line text box with the given maximum width (in pixels), center position, and color.

func (*TextBox) Draw

func (t *TextBox) Draw(screen *io.Screen) error

func (*TextBox) GetPosition

func (t *TextBox) GetPosition() sdl.FPoint

func (*TextBox) Preload

func (t *TextBox) Preload() error

func (*TextBox) Present

func (t *TextBox) Present(screen *io.Screen, clear, update bool) error

func (*TextBox) SetPosition

func (t *TextBox) SetPosition(pos sdl.FPoint)

func (*TextBox) Unload

func (t *TextBox) Unload() error

type TextInput

type TextInput struct {
	Message         string
	Position        sdl.FPoint
	BoxWidth        float32
	BackgroundColor sdl.Color
	FrameColor      sdl.Color
	TextColor       sdl.Color
	UserText        string
}

TextInput represents a text input box for user input.

func NewTextInput

func NewTextInput(message string, position sdl.FPoint, boxWidth float32, bgColor, frameColor, textColor sdl.Color) *TextInput

NewTextInput creates a new TextInput.

func (*TextInput) Draw

func (ti *TextInput) Draw(screen *io.Screen) error

func (*TextInput) Get

func (ti *TextInput) Get(screen *io.Screen, keyboard *io.Keyboard) (string, error)

Get displays the input box and waits for user input.

func (*TextInput) GetPosition

func (ti *TextInput) GetPosition() sdl.FPoint

func (*TextInput) Preload

func (ti *TextInput) Preload() error

func (*TextInput) Present

func (ti *TextInput) Present(screen *io.Screen, clear, update bool) error

func (*TextInput) SetPosition

func (ti *TextInput) SetPosition(pos sdl.FPoint)

func (*TextInput) Unload

func (ti *TextInput) Unload() error

type TextLine

type TextLine struct {
	Text     string
	Position sdl.FPoint
	Color    sdl.Color
	Font     *ttf.Font
	Texture  *sdl.Texture
	Width    float32
	Height   float32
}

TextLine is a single line of text rendered with an optional font (or the screen default).

func NewTextLine

func NewTextLine(text string, x, y float32, color sdl.Color) *TextLine

NewTextLine creates a text line at (x, y) in center-based coordinates with the given color.

func (*TextLine) Draw

func (t *TextLine) Draw(screen *io.Screen) error

func (*TextLine) GetPosition

func (t *TextLine) GetPosition() sdl.FPoint

func (*TextLine) Preload

func (t *TextLine) Preload() error

func (*TextLine) Present

func (t *TextLine) Present(screen *io.Screen, clear, update bool) error

func (*TextLine) SetPosition

func (t *TextLine) SetPosition(pos sdl.FPoint)

func (*TextLine) Unload

func (t *TextLine) Unload() error

type ThermometerDisplay

type ThermometerDisplay struct {
	State         float32 // 0 to 100
	Goal          float32 // 0 to 100
	Size          sdl.FPoint
	NrSegments    int
	Position      sdl.FPoint
	FrameColor    sdl.Color
	ActiveColor   sdl.Color
	InactiveColor sdl.Color
	GapColor      sdl.Color
	GoalColor     sdl.Color
	SegmentGap    float32
}

ThermometerDisplay represents a segmented progress bar with an optional goal.

func NewThermometerDisplay

func NewThermometerDisplay(size sdl.FPoint, nrSegments int, state, goal float32) *ThermometerDisplay

NewThermometerDisplay creates a new ThermometerDisplay.

func (*ThermometerDisplay) Draw

func (td *ThermometerDisplay) Draw(screen *io.Screen) error

func (*ThermometerDisplay) GetPosition

func (td *ThermometerDisplay) GetPosition() sdl.FPoint

func (*ThermometerDisplay) Preload

func (td *ThermometerDisplay) Preload() error

func (*ThermometerDisplay) Present

func (td *ThermometerDisplay) Present(screen *io.Screen, clear, update bool) error

func (*ThermometerDisplay) SetPosition

func (td *ThermometerDisplay) SetPosition(pos sdl.FPoint)

func (*ThermometerDisplay) Unload

func (td *ThermometerDisplay) Unload() error

type Tone

type Tone struct {
	Frequency float64
	Duration  int // ms
	Amplitude float32
	Stream    *sdl.AudioStream
	Data      []byte
}

Tone is a procedural sine-wave tone with configurable frequency (Hz), duration (ms), and amplitude.

func NewTone

func NewTone(frequency float64, duration int, amplitude float32) *Tone

NewTone creates a sine wave tone with the given frequency in Hz, duration in milliseconds, and amplitude (0–1).

func (*Tone) Play

func (t *Tone) Play() error

func (*Tone) Preload

func (t *Tone) Preload() error

func (*Tone) PreloadDevice

func (t *Tone) PreloadDevice(audioDevice sdl.AudioDeviceID) error

PreloadDevice generates the tone's PCM data.

func (*Tone) Present

func (t *Tone) Present(screen *io.Screen, clear, update bool) error

func (*Tone) Unload

func (t *Tone) Unload() error

type Video

type Video struct {
	FilePath string

	// Video properties
	Width  int
	Height int
	FPS    float64
	// contains filtered or unexported fields
}

Video represents a video stimulus that can be played with optional audio. It uses FFmpeg via the go-astiav bindings for demuxing/decoding and SDL3 for rendering frames and streaming audio to the experiment's audio device.

Typical usage:

v := stimuli.NewVideo("assets/clip.mp4")
if err := v.Preload(); err != nil { log.Fatal(err) }
if err := v.PreloadDevice(exp.Screen, exp.AudioDevice); err != nil { log.Fatal(err) }
if err := v.Play(); err != nil { log.Fatal(err) }

err := exp.Run(func() error {
    if err := v.Update(); err != nil { return err }
    if err := v.Present(exp.Screen, true, true); err != nil { return err }
    if !v.IsPlaying() { return sdl.EndLoop }
    return nil
})

func NewVideo

func NewVideo(filePath string) *Video

NewVideo creates a new video stimulus for the given file path. The underlying FFmpeg/SDL resources are allocated lazily in Preload and PreloadDevice.

func (*Video) Draw

func (v *Video) Draw(screen *io.Screen) error

Draw renders the current video frame centered on the screen.

func (*Video) DrawAt added in v0.1.1

func (v *Video) DrawAt(screen *io.Screen, dest *sdl.FRect) error

DrawAt renders the current video frame to the given destination rectangle. If dest is nil, the frame is centered at its native size using the renderer's current output size.

func (*Video) IsFinished

func (v *Video) IsFinished() bool

IsFinished returns true if the video has finished playback.

func (*Video) IsPaused

func (v *Video) IsPaused() bool

IsPaused returns true if the video is currently paused.

func (*Video) IsPlaying

func (v *Video) IsPlaying() bool

IsPlaying returns true if the video is currently active (playing or paused).

func (*Video) Pause

func (v *Video) Pause()

Pause pauses video playback, preserving the current playback position. Use Play() to resume from this position.

func (*Video) Play

func (v *Video) Play() error

Play starts (or resumes) video decoding and playback. It creates internal frame/audio buffers, launches the decoding goroutine, and resets the playback clock. Calling Play while paused resumes from the paused position.

func (*Video) Preload

func (v *Video) Preload() error

Preload opens the media file, discovers the best video and audio streams, allocates and opens the corresponding codec contexts, and prepares the software scaler/resampler. It does not allocate any SDL resources.

func (*Video) PreloadDevice

func (v *Video) PreloadDevice(screen *io.Screen, audioDevice sdl.AudioDeviceID) error

PreloadDevice prepares SDL‑specific resources for the video:

  • creates a texture on the provided Screen's renderer for video frames,
  • creates and binds an SDL AudioStream to the given audio device (if the video has an audio stream).

If Preload has not been called yet, PreloadDevice will call it first.

func (*Video) Present

func (v *Video) Present(screen *io.Screen, clear, update bool) error

Present implements the Stimulus interface for Video by drawing the current frame (optionally clearing the screen first) and optionally updating the screen. It does not itself advance decoding; call Update separately.

func (*Video) Seek

func (v *Video) Seek(t time.Duration) error

Seek moves the playback position to the specified time. Note: This stops the current playback and should be called before Play() or while the video is stopped.

func (*Video) Stop

func (v *Video) Stop()

Stop stops the video playback and cleans up decoding resources.

func (*Video) Unload

func (v *Video) Unload() error

Unload cleans up all resources associated with the video stimulus.

func (*Video) Update

func (v *Video) Update() error

Update advances decoding and playback state. It should be called frequently (typically once per frame) from the main experiment loop to:

  • pull decoded frames/audio from internal buffers,
  • push audio samples into the SDL AudioStream,
  • update which frame should currently be displayed based on the FPS.

type VisualMask

type VisualMask struct {
	Size            sdl.FPoint
	Position        sdl.FPoint
	DotSize         sdl.FPoint
	BackgroundColor sdl.Color
	DotColor        sdl.Color
	DotPercentage   int
	Texture         *sdl.Texture
}

VisualMask is a pattern mask of random dots over a background (e.g. for masking stimuli); DotPercentage controls fill (0–100).

func NewVisualMask

func NewVisualMask(width, height float32, dotWidth, dotHeight float32, bgColor, dotColor sdl.Color, dotPercentage int) *VisualMask

NewVisualMask creates a mask of the given size, dot size, background and dot colors, and dot percentage (0–100).

func (*VisualMask) Draw

func (vm *VisualMask) Draw(screen *io.Screen) error

func (*VisualMask) GetPosition

func (vm *VisualMask) GetPosition() sdl.FPoint

func (*VisualMask) Preload

func (vm *VisualMask) Preload() error

func (*VisualMask) Present

func (vm *VisualMask) Present(screen *io.Screen, clear, update bool) error

func (*VisualMask) SetPosition

func (vm *VisualMask) SetPosition(pos sdl.FPoint)

func (*VisualMask) Unload

func (vm *VisualMask) Unload() error

type VisualStimulus

type VisualStimulus interface {
	Stimulus
	Draw(screen *io.Screen) error
	GetPosition() sdl.FPoint
	SetPosition(pos sdl.FPoint)
}

VisualStimulus represents a visual stimulus that can be drawn on a Screen.

Jump to

Keyboard shortcuts

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