Docs @ Psychtoolbox Wiki : FillPoly

Search PTB Function help:
homepsychtoolbox.orgpage updateslogin

Revision [9153]

Last edited on 2008-11-05 05:59:19 by DocBot
Additions:
""<div class="subfct" id="Screen">""===[[FillPoly Screen('FillPoly')]]===
%%(matlab;Usage)Screen('FillPoly', windowPtr [,color], pointList [, isConvex]);%%
Fill polygon. "color" is the clut index (scalar or [r g b] or [r g b a] vector)
that you want to poke into each pixel; default produces white. "pointList" is a
matrix: each row specifies the (x,y) coordinates of a vertex.
The optional flag 'isConvex' allows you to tell the routine if the polygon is
convex, (value of 1) or if it is concave (value of 0), allowing the routine to
skip the test for convexity, thereby saving a bit of computation time in timing
sensitive scripts.
Drawing filled polygons is a rather compute intense and slow operation. In
general, drawing convex polygons is pretty fast, drawing concave, but not
self-intersecting polygons is much slower (> 30x slower), and drawing concave
self-intersecting polygons is extremely slow, e.g. > 2000 times slower. If you
have to draw very irregular polygons with may points, it might be a good idea to
preprocess them in some way and maybe break them up into a sequence of more
convex/regular polygons before submitting them to 'FillPoly'. Or you may want to
use some custom written drawing function for your purpose which is optimized for
drawing your type of polygons.
Deletions:
""<div class="subfct" id="Screen" style="background-color:#eee; padding:1em; border-width:1px; border-style:solid; border-color:#ddd; margin-bottom: 2em;border-top: 5px solid #999999;">""===[[FillPoly Screen('FillPoly')]]===
%%(matlab;Usage)Screen('FillPoly', windowPtr [,color], pointList);%%
Fill polygon. "color" is the clut index (scalar or [r g b a] vector) that you
want to poke into each pixel; default produces white. "pointList" is a matrix:
each row specifies the (x,y) coordinates of a vertex.


Revision [7037]

Edited on 2008-07-10 16:08:33 by DocBot
Additions:
""<div class="subfct" id="Screen" style="background-color:#eee; padding:1em; border-width:1px; border-style:solid; border-color:#ddd; margin-bottom: 2em;border-top: 5px solid #999999;">""===[[FillPoly Screen('FillPoly')]]===
FramePoly<<""</div>""
Deletions:
===[[FillPoly Screen('FillPoly')]]===
FramePoly<<


Revision [4977]

Edited on 2008-04-26 21:22:36 by DocBot
Additions:
%%(matlab;Usage)Screen('FillPoly', windowPtr [,color], pointList);%%
<<=====See also:=====
FramePoly<<
Deletions:
%%(matlab;Usage)[[Screen]]('FillPoly', windowPtr [,color], pointList);%%
""<<"" ""==""""==""See also:FramePoly""==""""==""""<<""


Revision [4948]

Edited on 2008-04-26 20:20:00 by DocBot
Additions:
===[[FillPoly Screen('FillPoly')]]===
==[[Psychtoolbox]] › [[Screen]].{mex*,dll} subfunction==
%%(matlab;Usage)[[Screen]]('FillPoly', windowPtr [,color], pointList);%%
""<<"" ""==""""==""See also:FramePoly""==""""==""""<<""
Deletions:
===[[FillPoly]]===
==ScreenFunctions==
Usage:
Screen('FillPoly', windowPtr [,color], pointList);
ScreenFunctions


Revision [2510]

The oldest known version of this page was created on 2008-03-15 23:18:57 by DocBot
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki
Page was generated in 0.0186 seconds