boutons XP color
Publié : lun. 28/août/2006 18:39
Voici un aperçu des boutons XP en couleur du code ci-dessus


Code : Tout sélectionner
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.0"
x="0"
y="0"
width="300"
height="200"
id="svg2">
<defs
id="defs4" />
<g
id="layer1">
<rect
width="300"
height="120"
x="0"
y="20"
style="fill:green;"
id="rect1306" />
<rect
width="80"
height="150"
x="20"
y="30"
style="fill:red;"
id="rect1308" />
<rect
width="140"
height="80"
x="50"
y="50"
style="fill:blue;"
id="rect1310" />
</g>
</svg>
Code : Tout sélectionner
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="1.0"
width="128"
height="128"
id="svg2">
<defs
id="defs5">
<linearGradient
id="linearGradient2814">
<stop
style="stop-color:#d2d2d2;stop-opacity:1"
offset="0"
id="stop2816" />
<stop
style="stop-color:white;stop-opacity:1"
offset="1"
id="stop2818" />
</linearGradient>
<linearGradient
id="linearGradient2792">
<stop
style="stop-color:#036fff;stop-opacity:1"
offset="0"
id="stop2794" />
<stop
style="stop-color:#8ec6ff;stop-opacity:1"
offset="1"
id="stop2796" />
</linearGradient>
<linearGradient
id="linearGradient2782">
<stop
style="stop-color:#0037b3;stop-opacity:1"
offset="0"
id="stop2784" />
<stop
style="stop-color:#0037b3;stop-opacity:0"
offset="1"
id="stop2786" />
</linearGradient>
<linearGradient
x1="48.103004"
y1="147.66602"
x2="123.94366"
y2="79.834923"
id="linearGradient2845"
xlink:href="#linearGradient2792"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(0,-60)" />
<linearGradient
x1="55.293175"
y1="80.000015"
x2="105.32492"
y2="39.280434"
id="linearGradient2847"
xlink:href="#linearGradient2814"
gradientUnits="userSpaceOnUse" />
<linearGradient
x1="86.772476"
y1="-30.744043"
x2="86.772476"
y2="-28.523281"
id="linearGradient2849"
xlink:href="#linearGradient2782"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.01893,0,0,1.344331,-1.529123,10.58335)" />
</defs>
<use
transform="translate(-32,32)"
id="use2836"
x="0"
y="0"
width="128"
height="128"
xlink:href="#g2822" />
<use
transform="translate(-16,16)"
id="use2834"
x="0"
y="0"
width="128"
height="128"
xlink:href="#g2822" />
<g
transform="translate(-4.063464,-2.031747)"
id="g2822">
<rect
width="74.59066"
height="66.5811"
rx="3.3862422"
ry="3.3862419"
x="48.728004"
y="20.459923"
style="opacity:1;fill:url(#linearGradient2845);fill-opacity:1;fill-rule:nonzero;stroke:#000060;stroke-width:1.875;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:12.5;stroke-opacity:1"
id="rect2790" />
<rect
width="64.846558"
height="50.951309"
x="53.600056"
y="30.735994"
style="opacity:1;fill:white;fill-opacity:1;fill-rule:nonzero;stroke:#0037b3;stroke-width:1.25000024;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:12.5;stroke-opacity:1"
id="rect2760" />
<rect
width="61.460316"
height="47.576721"
x="55.293175"
y="32.42329"
style="opacity:1;fill:url(#linearGradient2847);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.25;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:12.5;stroke-opacity:1"
id="rect1873" />
<rect
width="66.074074"
height="2.9746165"
x="52.986298"
y="-30.735998"
transform="scale(1,-1)"
style="opacity:1;fill:url(#linearGradient2849);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.25000024;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:12.5;stroke-opacity:1"
id="rect2780" />
</g>
</svg>
Nous avançons doucement sur la doc (environ 610 fonctions), j'ai presque terminé les LinearGradienBrush (une trentaine de fonctions, un fichier d'exemple par fonction et la page d'aide correspondante dans le fichier Chm). Cela prendra plusieurs mois et peut-être que certaines fonctions ne seront pas documentés, la doc de MS sur ces FlatAPI est inexistante (MS conseille d'utiliser la Poo pour GDI+ et n'a donc pas fait de doc sur les API de la Dll, heureusement on trouve de l'aide sur internet et en faisant des essais on arrive à comprendre).Flype a écrit :certains sont déjà au courant - d'autres pas, mais sachez que Denis
travaille dur sur la création d'une lib + manuel GDI pour purebasic 4.0
la tache est énorme parcequ'il y a beaucoup de fonctions GDI à implémenter.
voici le contenu de l'archive :===========
Gdiplus.dll
===========
For Windows XP use the system-supplied gdiplus.dll. Do not install a new gdiplus.dll over the system-supplied version (it will fail due to Windows File Protection).
For Windows 2000, Windows Millennium Edition, Windows NT 4.0 and Windows 98, install gdiplus.dll into the private directory of the application not into the system directory.
In addition to the rights granted in Section 1 of the Agreement ("Agreement"), with respect to gdiplus.dll for Windows 2000, Windows Millennium Edition, Windows NT 4.0 and Windows 98, you have the following non-exclusive, royalty free rights subject to the Distribution Requirements detailed in Section 1 of the Agreement:
(1) You may distribute gdiplus.dll solely for use with Windows 2000, Windows Millennium Edition, Windows NT 4.0 and Windows 98.
Code : Tout sélectionner
GetPixelFormatSize(pixfmt.l)
IsAlphaPixelFormat(pixfmt.l)
IsCanonicalPixelFormat(pixfmt.l)
IsExtendedPixelFormat(pixfmt.l)
IsIndexedPixelFormat(pixfmt.l)