Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
mgl:functionreferencescreen [2009/12/23 10:41]
justin
mgl:functionreferencescreen [2010/07/14 06:18] (current)
justin
Line 101: Line 101:
  
 **usage:** [displayInfo computerInfo] = mglDescribeDisplays()\\ **purpose:​** Gets information about your displays (as an array of structs with values for each monitor). As well as a single struct with info about your computer. **usage:** [displayInfo computerInfo] = mglDescribeDisplays()\\ **purpose:​** Gets information about your displays (as an array of structs with values for each monitor). As well as a single struct with info about your computer.
- 
 ===== mglFrameGrab:​ Frame grab to a matlab matrix ===== ===== mglFrameGrab:​ Frame grab to a matlab matrix =====
  
Line 112: Line 111:
   mglScreenCoordinates;​   mglScreenCoordinates;​
   mglClearScreen([0 0 0]);   mglClearScreen([0 0 0]);
-  ​global MGL; +  mglPoints2(mglGetParam('​screenWidth')*rand(5000,​1),​mglGetParam('​screenHeight')*rand(5000,​1));​ 
-  ​mglPoints2(MGL.screenWidth*rand(5000,​1),​MGL.screenHeight*rand(5000,​1));​ +  mglPolygon([0 0 mglGetParam('​screenWidth') mglGetParam('​screenWidth')],[mglGetParam('​screenHeight')/3 mglGetParam('​screenHeight')*2/3 mglGetParam('​screenHeight')*2/3 mglGetParam('​screenHeight')/3],0); 
-  mglPolygon([0 0 MGL.screenWidth ​MGL.screenWidth],​[MGL.screenHeight/​3 ​MGL.screenHeight*2/​3 ​MGL.screenHeight*2/​3 ​MGL.screenHeight/​3],​0);​ +  mglTextSet('​Helvetica',​32,​[1 1 1]); 
-   ​mglTextSet('​Helvetica',​32,​[1 1 1]); +  mglTextDraw('​Frame Grab',​[mglGetParam('​screenWidth')/2 mglGetParam('​screenHeight')/2]);
-  mglTextDraw('​Frame Grab',​[MGL.screenWidth/​2 ​MGL.screenHeight/​2]);​+
   frame = mglFrameGrab;​   frame = mglFrameGrab;​
-  mglFlush 
   imagesc(mean(frame,​3)'​);​colormap('​gray'​)   imagesc(mean(frame,​3)'​);​colormap('​gray'​)
 +  mglFlush
 +