|
14 | 14 |
|
15 | 15 | case 'make' |
16 | 16 |
|
17 | | - transparent = [0, 0, 0, 0]; |
| 17 | + TRANSPARENT = [0, 0, 0, 0]; |
18 | 18 |
|
19 | 19 | xCenter = cfg.screen.center(1); |
20 | 20 | yCenter = cfg.screen.center(2); |
|
23 | 23 |
|
24 | 24 | case 'none' |
25 | 25 |
|
26 | | - Screen('Fillrect', cfg.aperture.texture, transparent); |
| 26 | + Screen('Fillrect', cfg.aperture.texture, TRANSPARENT); |
27 | 27 |
|
28 | 28 | case 'circle' |
29 | 29 |
|
|
36 | 36 | yCenter = cfg.screen.center(2) + cfg.aperture.yPosPix; |
37 | 37 | end |
38 | 38 |
|
39 | | - Screen('FillOval', cfg.aperture.texture, transparent, ... |
| 39 | + Screen('FillOval', cfg.aperture.texture, TRANSPARENT, ... |
40 | 40 | CenterRectOnPoint([0, 0, repmat(diameter, 1, 2)], ... |
41 | 41 | xCenter, yCenter)); |
42 | 42 |
|
|
47 | 47 |
|
48 | 48 | Screen('Fillrect', cfg.aperture.texture, cfg.color.background); |
49 | 49 |
|
50 | | - Screen('FillOval', cfg.aperture.texture, transparent, ... |
| 50 | + Screen('FillOval', cfg.aperture.texture, TRANSPARENT, ... |
51 | 51 | CenterRectOnPoint( ... |
52 | 52 | [0, 0, repmat(cfg.ring.outerRimPix, 1, 2)], ... |
53 | 53 | xCenter, yCenter)); |
|
77 | 77 |
|
78 | 78 | Screen('Fillrect', cfg.aperture.texture, cfg.color.background); |
79 | 79 |
|
80 | | - Screen('FillArc', cfg.aperture.texture, transparent, ... |
| 80 | + Screen('FillArc', cfg.aperture.texture, TRANSPARENT, ... |
81 | 81 | CenterRect( ... |
82 | 82 | [0, 0, repmat(cfg.stimRect(4), 1, 2)], ... |
83 | 83 | cfg.screen.winRect), ... |
|
90 | 90 | Screen('FillRect', cfg.aperture.texture, cfg.color.background); |
91 | 91 |
|
92 | 92 | % We let the stimulus through |
93 | | - Screen('FillOval', cfg.aperture.texture, transparent, ... |
| 93 | + Screen('FillOval', cfg.aperture.texture, TRANSPARENT, ... |
94 | 94 | CenterRect([0, 0, repmat(cfg.stimRect(3), 1, 2)], cfg.screen.winRect)); |
95 | 95 |
|
96 | 96 | % Then we add the position of the bar aperture |
| 97 | + |
| 98 | + % which one is the right and which one is the left?? |
| 99 | + |
97 | 100 | Screen('FillRect', cfg.aperture.texture, cfg.color.background, ... |
98 | 101 | [0, ... |
99 | 102 | 0, ... |
|
120 | 123 | Screen('DrawTexture', cfg.screen.win, cfg.aperture.texture, ... |
121 | 124 | cfg.screen.winRect, ... |
122 | 125 | CenterRect( ... |
123 | | - cfg.screen.winRect * cfg.magnify.scalingFactor, ... |
| 126 | + cfg.screen.winRect, ... |
124 | 127 | cfg.screen.winRect), ... |
125 | 128 | thisEvent.condition - 90); |
126 | 129 | else |
|
166 | 169 |
|
167 | 170 | case 'bar' |
168 | 171 |
|
169 | | - extraPositons = 0; |
170 | | - if cfg.magnify.do |
171 | | - % we add some extra bar positions that we remove afterwards to |
172 | | - % prevent having nothing on screen for a long time |
173 | | - extraPositons = 12; |
174 | | - end |
175 | | - |
176 | 172 | % Set parameters drifting bars |
177 | | - cfg.aperture.barWidthPix = cfg.stimRect(3) / (cfg.volsPerCycle + extraPositons); |
| 173 | + cfg.aperture.barWidthPix = cfg.stimRect(3) / cfg.volsPerCycle; |
178 | 174 |
|
179 | 175 | barPosPix = ... |
180 | 176 | [0:cfg.aperture.barWidthPix:cfg.stimRect(3) - cfg.aperture.barWidthPix] + ... |
181 | 177 | (cfg.screen.winRect(3) / 2 - cfg.stimRect(3) / 2) + ... |
182 | 178 | cfg.aperture.barWidthPix / 2; %#ok<NBRAK> |
183 | 179 |
|
184 | | - % Those positions are removed because they are actually outside of |
185 | | - % the screen when magnification (fit to windows width) is on |
186 | | - if cfg.magnify.do |
187 | | - barPosPix([1:6, end - 5:end]) = []; |
188 | | - end |
189 | | - |
190 | 180 | cfg.aperture.barPosPix = barPosPix; |
191 | 181 |
|
192 | 182 | % Width of bar in degrees of VA (needed for saving) |
|
0 commit comments