Commit 3dd6046d authored by Alexandre Julliard's avatar Alexandre Julliard

user32: Specify cursor hotspots separately for each size.

This is supported in icoutils as of version 0.32.0. Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 6d2f4471
......@@ -51,6 +51,27 @@
inkscape:window-maximized="0"
inkscape:current-layer="svg2" />
<rect
id="hotspot:64"
height="1"
width="1"
y="0"
x="0"
style="fill:none" />
<rect
id="hotspot:48"
height="1"
width="1"
y="0"
x="0"
style="fill:none" />
<rect
id="hotspot:32"
height="1"
width="1"
y="0"
x="0"
style="fill:none" />
<rect
id="cursor:64-32"
height="64"
width="64"
......@@ -71,13 +92,6 @@
y="32"
x="112"
style="fill:none" />
<rect
id="hotspot"
height="1"
width="1"
y="0"
x="0"
style="fill:none" />
<g
style="display:inline;opacity:1"
id="g6054"
......
......@@ -51,6 +51,27 @@
inkscape:window-maximized="0"
inkscape:current-layer="svg2" />
<rect
id="hotspot:64"
height="1"
width="1"
y="30"
x="30"
style="fill:none" />
<rect
id="hotspot:48"
height="1"
width="1"
y="23"
x="22"
style="fill:none" />
<rect
id="hotspot:32"
height="1"
width="1"
y="15"
x="15"
style="fill:none" />
<rect
id="cursor:64-32"
height="64"
width="64"
......@@ -71,13 +92,6 @@
y="32"
x="112"
style="fill:none" />
<rect
id="hotspot"
height="1"
width="1"
y="15"
x="15"
style="fill:none" />
<g
style="display:inline;opacity:1"
transform="matrix(0.52397812,0,0,0.52397812,-1.9634705,-486.38388)"
......
......@@ -51,6 +51,27 @@
inkscape:window-maximized="0"
inkscape:current-layer="svg2" />
<rect
id="hotspot:64"
height="1"
width="1"
y="0"
x="15"
style="fill:none" />
<rect
id="hotspot:48"
height="1"
width="1"
y="0"
x="11"
style="fill:none" />
<rect
id="hotspot:32"
height="1"
width="1"
y="0"
x="7"
style="fill:none" />
<rect
id="cursor:64-32"
height="64"
width="64"
......@@ -71,13 +92,6 @@
y="32"
x="112"
style="fill:none" />
<rect
id="hotspot"
height="1"
width="1"
y="0"
x="7"
style="fill:none" />
<g
transform="matrix(0.49646702,0,0,0.49659531,-9.4425305,-10.050669)"
id="g2996-3"
......
......@@ -51,6 +51,27 @@
inkscape:window-maximized="0"
inkscape:current-layer="svg2" />
<rect
id="hotspot:64"
height="1"
width="1"
y="0"
x="0"
style="fill:none" />
<rect
id="hotspot:48"
height="1"
width="1"
y="0"
x="0"
style="fill:none" />
<rect
id="hotspot:32"
height="1"
width="1"
y="0"
x="0"
style="fill:none" />
<rect
id="cursor:64-32"
height="64"
width="64"
......@@ -71,13 +92,6 @@
y="32"
x="112"
style="fill:none" />
<rect
id="hotspot"
height="1"
width="1"
y="0"
x="0"
style="fill:none" />
<g
style="display:inline;opacity:1"
id="g6054"
......
......@@ -51,6 +51,27 @@
inkscape:window-maximized="0"
inkscape:current-layer="svg2" />
<rect
id="hotspot:64"
height="1"
width="1"
y="18"
x="7"
style="fill:none" />
<rect
id="hotspot:48"
height="1"
width="1"
y="13"
x="5"
style="fill:none" />
<rect
id="hotspot:32"
height="1"
width="1"
y="9"
x="3"
style="fill:none" />
<rect
id="cursor:64-32"
height="64"
width="64"
......@@ -71,13 +92,6 @@
y="32"
x="112"
style="fill:none" />
<rect
id="hotspot"
height="1"
width="1"
y="9"
x="3"
style="fill:none" />
<g
style="display:inline;opacity:1"
transform="matrix(0.49522582,0,0,0.49522582,-23.104839,-469.24018)"
......
......@@ -51,6 +51,27 @@
inkscape:window-maximized="0"
inkscape:current-layer="svg2" />
<rect
id="hotspot:64"
height="1"
width="1"
y="16"
x="16"
style="fill:none" />
<rect
id="hotspot:48"
height="1"
width="1"
y="12"
x="12"
style="fill:none" />
<rect
id="hotspot:32"
height="1"
width="1"
y="8"
x="8"
style="fill:none" />
<rect
id="cursor:64-32"
height="64"
width="64"
......@@ -71,13 +92,6 @@
y="32"
x="112"
style="fill:none" />
<rect
id="hotspot"
height="1"
width="1"
y="8"
x="8"
style="fill:none" />
<g
style="display:inline;opacity:1"
id="g7513"
......
......@@ -51,6 +51,27 @@
inkscape:window-maximized="0"
inkscape:current-layer="svg2" />
<rect
id="hotspot:64"
height="1"
width="1"
y="0"
x="0"
style="fill:none" />
<rect
id="hotspot:48"
height="1"
width="1"
y="0"
x="0"
style="fill:none" />
<rect
id="hotspot:32"
height="1"
width="1"
y="0"
x="0"
style="fill:none" />
<rect
id="cursor:64-32"
height="64"
width="64"
......@@ -71,13 +92,6 @@
y="32"
x="112"
style="fill:none" />
<rect
id="hotspot"
height="1"
width="1"
y="0"
x="0"
style="fill:none" />
<g
style="display:inline;opacity:1"
id="g6054"
......
......@@ -51,6 +51,27 @@
inkscape:window-maximized="0"
inkscape:current-layer="svg2" />
<rect
id="hotspot:64"
height="1"
width="1"
y="43"
x="0"
style="fill:none" />
<rect
id="hotspot:48"
height="1"
width="1"
y="32"
x="0"
style="fill:none" />
<rect
id="hotspot:32"
height="1"
width="1"
y="21"
x="0"
style="fill:none" />
<rect
id="cursor:64-32"
height="64"
width="64"
......@@ -71,13 +92,6 @@
y="32"
x="112"
style="fill:none" />
<rect
id="hotspot"
height="1"
width="1"
y="21"
x="0"
style="fill:none" />
<g
style="display:inline;opacity:1;stroke-width:12.33332825"
transform="matrix(0.14986395,0.04015593,-0.04015593,0.14986395,45.748216,-191.99561)"
......
......@@ -51,6 +51,27 @@
inkscape:window-maximized="0"
inkscape:current-layer="svg2" />
<rect
id="hotspot:64"
height="1"
width="1"
y="19"
x="19"
style="fill:none" />
<rect
id="hotspot:48"
height="1"
width="1"
y="14"
x="14"
style="fill:none" />
<rect
id="hotspot:32"
height="1"
width="1"
y="10"
x="10"
style="fill:none" />
<rect
id="cursor:64-32"
height="64"
width="64"
......@@ -71,13 +92,6 @@
y="32"
x="112"
style="fill:none" />
<rect
id="hotspot"
height="1"
width="1"
y="10"
x="10"
style="fill:none" />
<g
id="g9368"
transform="matrix(0.43521339,0,0,0.43527092,-6.3667091,-410.06917)"
......
......@@ -51,6 +51,27 @@
inkscape:window-maximized="0"
inkscape:current-layer="svg2" />
<rect
id="hotspot:64"
height="1"
width="1"
y="19"
x="19"
style="fill:none" />
<rect
id="hotspot:48"
height="1"
width="1"
y="14"
x="14"
style="fill:none" />
<rect
id="hotspot:32"
height="1"
width="1"
y="10"
x="10"
style="fill:none" />
<rect
id="cursor:64-32"
height="64"
width="64"
......@@ -92,13 +113,6 @@
y="32"
x="256"
style="fill:none" />
<rect
id="hotspot"
height="1"
width="1"
y="10"
x="10"
style="fill:none" />
<g
id="g9368"
transform="matrix(0.43521339,0,0,0.43527092,-6.3667091,-410.06917)"
......
......@@ -51,6 +51,27 @@
inkscape:window-maximized="0"
inkscape:current-layer="svg2" />
<rect
id="hotspot:64"
height="1"
width="1"
y="14"
x="14"
style="fill:none" />
<rect
id="hotspot:48"
height="1"
width="1"
y="10"
x="10"
style="fill:none" />
<rect
id="hotspot:32"
height="1"
width="1"
y="7"
x="7"
style="fill:none" />
<rect
id="cursor:64-32"
height="64"
width="64"
......@@ -71,13 +92,6 @@
y="32"
x="112"
style="fill:none" />
<rect
id="hotspot"
height="1"
width="1"
y="7"
x="7"
style="fill:none" />
<g
style="display:inline;opacity:1"
inkscape:transform-center-y="1.0996192"
......
......@@ -51,6 +51,27 @@
inkscape:window-maximized="0"
inkscape:current-layer="svg2" />
<rect
id="hotspot:64"
height="1"
width="1"
y="18"
x="12"
style="fill:none" />
<rect
id="hotspot:48"
height="1"
width="1"
y="14"
x="9"
style="fill:none" />
<rect
id="hotspot:32"
height="1"
width="1"
y="9"
x="6"
style="fill:none" />
<rect
id="cursor:64-32"
height="64"
width="64"
......@@ -71,13 +92,6 @@
y="32"
x="112"
style="fill:none" />
<rect
id="hotspot"
height="1"
width="1"
y="9"
x="6"
style="fill:none" />
<g
style="display:inline;opacity:1"
id="g8894"
......
......@@ -51,6 +51,27 @@
inkscape:window-maximized="0"
inkscape:current-layer="svg2" />
<rect
id="hotspot:64"
height="1"
width="1"
y="14"
x="14"
style="fill:none" />
<rect
id="hotspot:48"
height="1"
width="1"
y="10"
x="10"
style="fill:none" />
<rect
id="hotspot:32"
height="1"
width="1"
y="7"
x="7"
style="fill:none" />
<rect
id="cursor:64-32"
height="64"
width="64"
......@@ -71,13 +92,6 @@
y="32"
x="112"
style="fill:none" />
<rect
id="hotspot"
height="1"
width="1"
y="7"
x="7"
style="fill:none" />
<g
style="display:inline;opacity:1"
id="g8900"
......
......@@ -51,6 +51,27 @@
inkscape:window-maximized="0"
inkscape:current-layer="svg2" />
<rect
id="hotspot:64"
height="1"
width="1"
y="12"
x="20"
style="fill:none" />
<rect
id="hotspot:48"
height="1"
width="1"
y="8"
x="15"
style="fill:none" />
<rect
id="hotspot:32"
height="1"
width="1"
y="6"
x="10"
style="fill:none" />
<rect
id="cursor:64-32"
height="64"
width="64"
......@@ -71,13 +92,6 @@
y="32"
x="112"
style="fill:none" />
<rect
id="hotspot"
height="1"
width="1"
y="6"
x="10"
style="fill:none" />
<g
style="display:inline;opacity:1"
transform="matrix(0.41976423,0,0,0.41976423,-5.9763671,-402.06047)"
......
......@@ -51,6 +51,27 @@
inkscape:window-maximized="0"
inkscape:current-layer="svg2" />
<rect
id="hotspot:64"
height="1"
width="1"
y="0"
x="13"
style="fill:none" />
<rect
id="hotspot:48"
height="1"
width="1"
y="0"
x="10"
style="fill:none" />
<rect
id="hotspot:32"
height="1"
width="1"
y="0"
x="6"
style="fill:none" />
<rect
id="cursor:64-32"
height="64"
width="64"
......@@ -71,13 +92,6 @@
y="32"
x="112"
style="fill:none" />
<rect
id="hotspot"
height="1"
width="1"
y="0"
x="6"
style="fill:none" />
<g
style="display:inline;opacity:1"
transform="matrix(0.45710405,0,0,0.45710405,-15.459802,20.963507)"
......
......@@ -51,6 +51,27 @@
inkscape:window-maximized="0"
inkscape:current-layer="svg2" />
<rect
id="hotspot:64"
height="1"
width="1"
y="30"
x="30"
style="fill:none" />
<rect
id="hotspot:48"
height="1"
width="1"
y="22"
x="23"
style="fill:none" />
<rect
id="hotspot:32"
height="1"
width="1"
y="15"
x="15"
style="fill:none" />
<rect
id="cursor:64-32"
height="64"
width="64"
......@@ -71,13 +92,6 @@
y="32"
x="112"
style="fill:none" />
<rect
id="hotspot"
height="1"
width="1"
y="15"
x="15"
style="fill:none" />
<g
transform="matrix(0.44197283,0,0,0.44197283,-8.0778187,-406.26428)"
id="layer1-9"
......
......@@ -38,6 +38,7 @@ die "Only BMP, ICO and CUR outputs are supported" unless $ext eq "bmp" or $ext e
my $renderedSVGFileName = "$svgFileName.png";
my @pngFiles;
my @hotspot;
# Get the programs from the environment variables
my $convert = $ENV{"CONVERT"} || "convert";
......@@ -77,9 +78,9 @@ sub svg_element_start
my $width = 0;
my $height = 0;
if ($id eq "hotspot")
if ($id =~ /hotspot:(\d*)/)
{
push @icotool_args, "--hotspot-x=$attr{x}", "--hotspot-y=$attr{y}";
$hotspot[$1] = [ $attr{x}, $attr{y} ];
return;
}
......@@ -148,6 +149,12 @@ sub svg_element_start
return;
}
if (defined $hotspot[$size])
{
my @coords = @{$hotspot[$size]};
push @icotool_args, "--hotspot-x=$coords[0]", "--hotspot-y=$coords[1]";
}
if ($width >= 128 && $height >= 128)
{
push @icotool_args, "--raw=$pngFileName";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment