TextStim ( win, 'Color me!', color = ( 0, 1, 0 ), colorSpace = 'rgb' ) # An almost-black text stim. Thus you usually want to specify colorSpace before Please note that changing colorSpace does not change stimulus If None the default colorSpace for the stimulus is property colorSpace ¶įor strings and hex values this is not needed. property color ¶Īlternative way of setting foreColor. Of your stimulus, so doesn’t need calling explicitly by the user. Legacy property for setting the border color of a stimulus in RGB, instead use obj._borderColor.rgb Type :ĭEPRECATED borderWidth ¶ clearTextures ( ) ¶Īs of v1.61.00 this is called automatically during garbage collection Legacy property for setting the fill color of a stimulus in RGB, instead use obj._fillColor.rgb Type :Īlternative way of setting fillColor property borderColor ¶ property borderColorSpace ¶ Want to avoid swamping the log file with messages that aren’t likely toĪlternative way of setting fillColor property backColorSpace ¶ĭeprecated, please use colorSpace to set color space for the entire updating its position every frame) and you 1080x720 pixelsĭetermines whether the stimulus should be automatically drawn returns :Īspect ratio as a (w, h) tuple, simplified using the smallest common denominator (e.g. _borderPix from pos, size, ori,įlipVert, flipHoriz property anchor ¶ property aspectRatio ¶Īspect ratio of original image, before taking into account the. Call it if you change a property manually Representation of your stimulus if some parameter of the _updateListShaders ( ) ¶Īfter every call to. The user shouldn’t need this method since it gets calledĬhooses between using and not using shaders each call. Use setAttribute() and val2array() instead. _set ( attrib, val, op = '', log = None ) ¶ _setCurrent() method which handles the switch. ‘viewfinder’ of sorts for the camera to view a live video stream on a This enables the ImageStim to be used as a This method is used internally to copy pixel data from a camera object _movieFrameToTexture ( movieSrc ) ¶Ĭonvert a movie frame to a texture and use it. Requires self.rgb, lorSpace and ntrast _getPolyAsRendered ( ) ¶ĭEPRECATED. _getDesiredRGB ( rgb, colorSpace, contrast ) ¶Ĭonvert color to RGB while adding contrast. Wrapping ( bool) – Enable wrapping of the texture. Otherwise the wrapping of the texture will notĭataType (class: ~pyglet.gl.GLenum, int or None) – None, GL_UNSIGNED_BYTE, GL_FLOAT. Stimuli (anything that needs multiple cycles) forcePOW2 should be MaskParams ( dict or None) – Additional parameters to configure the mask used with this texture.įorcePOW2 ( bool) – Force the texture to be stored in a square memory area. Res ( int) – The resolution of the texture (unless a bitmap image is used). Stim ( Any) – Stimulus object using the texture. PixFormat ( GLenum or int) – Pixel format to use, values can be GL_ALPHA or GL_RGB. Value can be anything that resembles image data. _calcSizeRendered ( ) ¶īy _updateVertices() and verticesPix _createTexture ( tex, id, pixFormat, stim, res = 128, maskParams = None, forcePOW2 = True, dataType = None, wrapping = True ) ¶Ĭreate a new OpenGL 2D image texture. This functionality is now handledīy _updateVertices() and verticesPix. Legacy property for setting the foreground color of a stimulus in RGB, instead use obj._foreColor.rgb Type :ĭEPRECATED in 1.80.00. ImageStim ( win, image = None, mask = None, units = '', pos = (0.0, 0.0), size = None, anchor = 'center', ori = 0.0, color = (1.0, 1.0, 1.0), colorSpace = 'rgb', contrast = 1.0, opacity = None, depth = 0, interpolate = False, draggable = False, flipHoriz = False, flipVert = False, texRes = 128, name = None, autoLog = None, maskParams = None ) ¶ĭisplay an image on a property RGB ¶ Whether every change in this stimulus should be auto logged.ĭetermines whether the stimulus should be automatically drawn on every frame flip.Ĭlear all textures associated with the stimulus.ĭetails ¶ class psychopy.visual. The name ( str) of the object to be using during logged messages about this stim. Returns True if this stimulus intersects another one. Returns True if a point x,y is inside the stimulus' border. Whether to interpolate (linearly) the texture in the stimulus. The name of the color space currently being usedĭetermines how visible the stimulus is relative to background. The size (width, height) of the stimulus in the stimulus unitsĪ value that is simply multiplied by the color. The orientation of the stimulus (in degrees). The position of the center of the stimulus in the stimulus units Usually you can use 'stim.attribute = value' syntax instead, but use this method if you need to suppress the log message. The Window object in which the stimulus will be rendered by default.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |