PsychoJL.LineType
Line()

Constructor for a Line object

Constructor inputs:

  • win::Window

  • startPoint::Vector{Int64}

  • endPoint::Vector{Int64}

  • width::Int64

  • lineColor::Vector{Int64}

Outputs: None

Methods: draw()

source
PsychoJL.RectType
Rect()

Constructor for a Rect object

Constructor inputs:

  • win::Window,
  • width::Int64
  • height::Int64
  • pos::Vector{Int64} position

Optional constructor inputs:

  • units::String...(default is "pixel"
  • lineWidth::Int64...(default is 1)
  • lineColor::Vector{Int64}...default is (128, 128, 128)
  • fillColor::Vector{Int64}...default is (128, 128, 128)
  • ori::Float64 = 0.0...(orientation in degrees)
  • opacity::Int64...(default is 255)

Full list of fields

  • win::Window
  • width::Int64
  • height::Int64
  • pos::Vector{Int64}
  • units::String
  • lineWidth::Int64
  • lineColor::Vector{Int64}
  • fillColor::Vector{Int64}
  • ori::Float64
  • opacity::Int64
  • SDLRect::SDL_Rect

Methods: draw()

source
PsychoJL.EllipseType
Ellipse()

Constructor for an Ellipse object

Inputs:

  • win::Window
  • pos::Vector{Int64}
  • rx::Int64 horizontal radius
  • ry::Int64 vertical radius
  • lineWidth::Int64
  • lineColor::Vector{Int64}
  • fillColor::Vector{Int64}
  • fill::Bool fill or not

Outputs: None Methods: draw()

source

draw(various shape types) - Method

Draws the shape (Line, Rect, Ellipse, TextStim, etc.) into the back buffer.

Example:


	newRect = Rect(myWin, 
			100,			# width
			100, 			# height
			[200,200],		# position
			lineColor = [255,0,0], 
			fillColor = [255,128,128] 
			)
	draw(newRect) 		# in PsychoPy this would have been newRect.draw()

"""