Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
f7313629
Kaydet (Commit)
f7313629
authored
Kas 14, 2014
tarafından
Michael Meeks
Kaydeden (comit)
Markus Mohrhard
Kas 15, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
vcldemo: exercise more BitmapEx rendering paths.
Change-Id: Iecd02534dfbe0938a8635e3b7c2363b4531ef5ef
üst
1d2c5224
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
7 deletions
+38
-7
vcldemo.cxx
vcl/workben/vcldemo.cxx
+38
-7
No files found.
vcl/workben/vcldemo.cxx
Dosyayı görüntüle @
f7313629
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
#include <vcl/graphicfilter.hxx>
#include <vcl/graphicfilter.hxx>
#include <vcl/button.hxx>
#include <vcl/button.hxx>
#include <vcl/floatwin.hxx>
#include <vcl/floatwin.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#if 0
#if 0
# define FIXME_SELF_INTERSECTING_WORKING
# define FIXME_SELF_INTERSECTING_WORKING
...
@@ -610,31 +611,61 @@ public:
...
@@ -610,31 +611,61 @@ public:
bHasLoadedAll
=
true
;
bHasLoadedAll
=
true
;
css
::
uno
::
Sequence
<
OUString
>
aAllIcons
=
ImageTree_getAllImageNames
();
css
::
uno
::
Sequence
<
OUString
>
aAllIcons
=
ImageTree_getAllImageNames
();
for
(
sal_Int32
i
=
0
;
i
<
aAllIcons
.
getLength
()
&&
i
<
1024
;
i
++
)
for
(
sal_Int32
i
=
0
;
i
<
aAllIcons
.
getLength
();
i
++
)
{
{
maIconNames
.
push_back
(
aAllIcons
[
i
]);
maIconNames
.
push_back
(
aAllIcons
[
i
]);
maIcons
.
push_back
(
BitmapEx
(
aAllIcons
[
i
]));
maIcons
.
push_back
(
BitmapEx
(
aAllIcons
[
i
]));
}
}
}
}
void
doDrawIcons
(
OutputDevice
&
rDev
,
Rectangle
r
)
void
doDrawIcons
(
OutputDevice
&
rDev
,
Rectangle
r
,
bool
bExpanded
)
{
{
long
nMaxH
=
0
,
nVPos
=
0
;
long
nMaxH
=
0
,
nVPos
=
0
;
Point
p
(
r
.
TopLeft
());
Point
p
(
r
.
TopLeft
());
for
(
size_t
i
=
0
;
i
<
maIcons
.
size
();
i
++
)
size_t
nToRender
=
maIcons
.
size
();
if
(
!
bExpanded
&&
maIcons
.
size
()
>
64
)
nToRender
=
64
;
for
(
size_t
i
=
0
;
i
<
nToRender
;
i
++
)
{
{
Size
aSize
(
maIcons
[
i
].
GetSizePixel
());
Size
aSize
(
maIcons
[
i
].
GetSizePixel
());
// sAL_DEBUG("Draw icon '" << maIconNames[i] << "'");
// sAL_DEBUG("Draw icon '" << maIconNames[i] << "'");
rDev
.
DrawBitmapEx
(
p
,
maIcons
[
i
]);
basegfx
::
B2DHomMatrix
aTransform
;
aTransform
.
scale
(
aSize
.
Width
(),
aSize
.
Height
());
aTransform
.
translate
(
p
.
X
(),
p
.
Y
());
switch
(
1
)
{
case
0
:
rDev
.
DrawBitmapEx
(
p
,
maIcons
[
i
]);
break
;
case
1
:
rDev
.
DrawTransformedBitmapEx
(
aTransform
,
maIcons
[
i
]);
break
;
case
2
:
aTransform
.
shearX
(
10
);
rDev
.
DrawTransformedBitmapEx
(
aTransform
,
maIcons
[
i
]);
break
;
case
3
:
aTransform
.
rotate
(
i
);
rDev
.
DrawTransformedBitmapEx
(
aTransform
,
maIcons
[
i
]);
break
;
}
p
.
Move
(
aSize
.
Width
(),
0
);
p
.
Move
(
aSize
.
Width
(),
0
);
if
(
aSize
.
Height
()
>
nMaxH
)
if
(
aSize
.
Height
()
>
nMaxH
)
nMaxH
=
aSize
.
Height
();
nMaxH
=
aSize
.
Height
();
if
(
p
.
X
()
>=
r
.
Right
())
if
(
p
.
X
()
>=
r
.
Right
())
// wrap to next line
{
{
nVPos
+=
nMaxH
;
nVPos
+=
nMaxH
;
nMaxH
=
0
;
nMaxH
=
0
;
p
=
Point
(
r
.
Left
(),
r
.
Top
()
+
nVPos
);
p
=
Point
(
r
.
Left
(),
r
.
Top
()
+
nVPos
);
}
}
if
(
p
.
Y
()
>=
r
.
Bottom
())
// re-start at top
{
p
=
r
.
TopLeft
();
nVPos
=
0
;
}
}
}
}
}
...
@@ -644,11 +675,11 @@ public:
...
@@ -644,11 +675,11 @@ public:
if
(
rCtx
.
meStyle
==
RENDER_EXPANDED
)
if
(
rCtx
.
meStyle
==
RENDER_EXPANDED
)
{
{
LoadAllImages
();
LoadAllImages
();
doDrawIcons
(
rDev
,
r
);
doDrawIcons
(
rDev
,
r
,
true
);
}
}
else
else
{
{
doDrawIcons
(
rDev
,
r
);
doDrawIcons
(
rDev
,
r
,
false
);
}
}
}
}
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment