|
FOROS PROFESIONALES WINDEV, WEBDEV y WINDEV Mobile |
| | | | | |
manipuler des Regions non rectangulaires |
Iniciado por nvipilote, 30,nov. 2004 15:07 - 1 respuesta |
| |
| | | |
|
| |
Publicado el 30,noviembre 2004 - 15:07 |
Bonjour,
Pour savoir si un point est dans un rectangle pas de problème.
J'aimerais savoir, pour un polygone non rectangulaire, si un point est dans ce polygone. j'ai essayé diverses syntaxes sans succès.
l'API("GDI32","PtInRegion",hrgn,lx,ly) renvoie toujours 0. Comment définir la région hrgn? Cette région peut-elle être un polygone quelconque?
Peut être avec le .NET? mais comment savoir la méthode et la description des paramètres à employer?
Merci de votre aide. Mireille
--------------- |
| |
| |
| | | |
|
| | |
| |
Publicado el 02,diciembre 2004 - 12:25 |
This is a multi-part message in MIME format.
------=_NextPart_000_005C_01C4D861.96651210 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
voila ce qu'il y a dans l'aide de l'api Win32
the CreatePolygonRgn function creates a polygonal region.
HRGN CreatePolygonRgn(
CONST POINT *lppt, // address of array of points int cPoints, // number of points in array int fnPolyFillMode // polygon-filling mode ); Parameters
lppt
Points to an array of POINT structures that define the vertices of the = polygon. The polygon is presumed closed. Each vertex can be specified = only once.
cPoints
Specifies the number of points in the array.
fnPolyFillMode
Specifies the fill mode used to determine which pixels are in the = region. This parameter can be one of the following values:
Value Meaning ALTERNATE Selects alternate mode (fills area between odd-numbered and = even-numbered polygon sides on each scan line). WINDING Selects winding mode (fills any region with a nonzero winding = value). For more information about these modes, see the SetPolyFillMode = function.
Return Value
If the function succeeds, the return value is the handle of the region. If the function fails, the return value is NULL.
"Mireille Epoudry" <nvipilote@wanadoo.fr> a écrit dans le message de = news: 41ac66c5@news.pcsoft.fr...
Bonjour,
Pour savoir si un point est dans un rectangle pas de problème.
J'aimerais savoir, pour un polygone non rectangulaire, si un point est =
dans ce polygone.
j'ai essayé diverses syntaxes sans succès.
l'API("GDI32","PtInRegion",hrgn,lx,ly) renvoie toujours 0. Comment définir la région hrgn? Cette région peut-elle être un = polygone quelconque?
Peut être avec le .NET? mais comment savoir la méthode et la description des paramètres =
à employer?
Merci de votre aide. Mireille
---------------
------=_NextPart_000_005C_01C4D861.96651210 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; = charset=iso-8859-1"> <META content="MSHTML 6.00.2800.1264" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY> <DIV><FONT face=Arial size=2><U>voila ce qu'il y a dans l'aide de = l'api Win32</U></FONT></DIV> <DIV><FONT face=Arial size=2></FONT><FONT face=Arial = size=2></FONT> </DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>the CreatePolygonRgn function creates a = polygonal region. </FONT></DIV> <DIV> </DIV> <DIV><FONT face=Arial size=2>HRGN CreatePolygonRgn(</FONT></DIV> <DIV> </DIV> <DIV><FONT face=Arial size=2> CONST POINT = *lppt, // address of array of points <BR> int = cPoints, // number of points in array <BR> int = fnPolyFillMode // polygon-filling mode <BR> ); <BR>Parameters</FONT></DIV> <DIV> </DIV> <DIV><FONT face=Arial size=2>lppt</FONT></DIV> <DIV> </DIV> <DIV><FONT face=Arial size=2>Points to an array of POINT structures = that define the vertices of the polygon. The polygon is presumed closed. Each vertex = can be specified only once.</FONT></DIV> <DIV> </DIV> <DIV><FONT face=Arial size=2>cPoints</FONT></DIV> <DIV> </DIV> <DIV><FONT face=Arial size=2>Specifies the number of points in the = array. </FONT></DIV> <DIV> </DIV> <DIV><FONT face=Arial size=2>fnPolyFillMode</FONT></DIV> <DIV> </DIV> <DIV><FONT face=Arial size=2>Specifies the fill mode used to = determine which pixels are in the region. This parameter can be one of the following = values: </FONT></DIV> <DIV> </DIV> <DIV><FONT face=Arial = size=2>Value Meaning<BR>ALTERNATE Selects alternate mode (fills area between odd-numbered and even-numbered = polygon sides on each scan line).<BR>WINDING Selects winding mode (fills any = region with a nonzero winding value).<BR>For more information about these modes, see = the SetPolyFillMode function. </FONT></DIV> <DIV> </DIV> <DIV><FONT face=Arial size=2>Return Value</FONT></DIV> <DIV> </DIV> <DIV><FONT face=Arial size=2>If the function succeeds, the return = value is the handle of the region.<BR>If the function fails, the return value is = NULL. </FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>"Mireille Epoudry" <</FONT><A href="mailto:nvipilote@wanadoo.fr"><FONT face=Arial size=2>nvipilote@wanadoo.fr</FONT></A><FONT face=Arial size=2>> = a écrit dans le message de news: </FONT><A = href="mailto:41ac66c5@news.pcsoft.fr"><FONT face=Arial size=2>41ac66c5@news.pcsoft.fr</FONT></A><FONT = face=Arial size=2>...</FONT></DIV><FONT face=Arial size=2>> <BR>> = <BR>> Bonjour,<BR>> <BR>> Pour savoir si un point est dans un rectangle = pas de problème. <BR>> <BR>> J'aimerais savoir, pour un polygone non rectangulaire, si un point est dans ce polygone.<BR>> j'ai essayé = diverses syntaxes sans succès.<BR>> <BR>> l'API("GDI32","PtInRegion",hrgn,lx,ly)<BR>> renvoie toujours = 0.<BR>> Comment définir la région hrgn? Cette région peut-elle être un = polygone quelconque?<BR>> <BR>> Peut être avec le .NET? <BR>> mais = comment savoir la méthode et la description des paramètres à = employer?<BR>> <BR>> Merci de votre aide.<BR>> Mireille<BR>> <BR>> = ---------------<BR>> </FONT></BODY></HTML>
------=_NextPart_000_005C_01C4D861.96651210-- |
| |
| |
| | | |
|
| | | | |
| | |
| | |
| |
|
|
|