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
4ce1300f
Kaydet (Commit)
4ce1300f
authored
Şub 03, 2014
tarafından
Jan Holesovsky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
thumbnails: Nobody uses the overlay functionality now, kill it.
Change-Id: I74c463b67dd950a3e4de838ed0dc55ec366ab8a7
üst
cd5bc497
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
32 deletions
+5
-32
gdimtf.hxx
include/vcl/gdimtf.hxx
+2
-2
gdimtf.cxx
vcl/source/gdi/gdimtf.cxx
+3
-30
No files found.
include/vcl/gdimtf.hxx
Dosyayı görüntüle @
4ce1300f
...
@@ -213,8 +213,8 @@ public:
...
@@ -213,8 +213,8 @@ public:
friend
VCL_DLLPUBLIC
SvStream
&
operator
>>
(
SvStream
&
rIStm
,
GDIMetaFile
&
rGDIMetaFile
);
friend
VCL_DLLPUBLIC
SvStream
&
operator
>>
(
SvStream
&
rIStm
,
GDIMetaFile
&
rGDIMetaFile
);
friend
VCL_DLLPUBLIC
SvStream
&
WriteGDIMetaFile
(
SvStream
&
rOStm
,
const
GDIMetaFile
&
rGDIMetaFile
);
friend
VCL_DLLPUBLIC
SvStream
&
WriteGDIMetaFile
(
SvStream
&
rOStm
,
const
GDIMetaFile
&
rGDIMetaFile
);
/// Creates an antialiased thumbnail, with maximum
height or width
of nMaximumExtent.
/// Creates an antialiased thumbnail, with maximum
width or height
of nMaximumExtent.
sal_Bool
CreateThumbnail
(
BitmapEx
&
rBmpEx
,
sal_uInt32
nMaximumSize
=
256
,
const
BitmapEx
*
pOverlay
=
NULL
,
const
Rectangle
*
pOverlayRect
=
NULL
)
const
;
sal_Bool
CreateThumbnail
(
BitmapEx
&
rBmpEx
,
sal_uInt32
nMaximumSize
=
256
)
const
;
void
UseCanvas
(
sal_Bool
_bUseCanvas
);
void
UseCanvas
(
sal_Bool
_bUseCanvas
);
sal_Bool
GetUseCanvas
()
const
{
return
bUseCanvas
;
}
sal_Bool
GetUseCanvas
()
const
{
return
bUseCanvas
;
}
...
...
vcl/source/gdi/gdimtf.cxx
Dosyayı görüntüle @
4ce1300f
...
@@ -2869,8 +2869,7 @@ SvStream& GDIMetaFile::Write( SvStream& rOStm )
...
@@ -2869,8 +2869,7 @@ SvStream& GDIMetaFile::Write( SvStream& rOStm )
return
rOStm
;
return
rOStm
;
}
}
sal_Bool
GDIMetaFile
::
CreateThumbnail
(
BitmapEx
&
rBmpEx
,
sal_uInt32
nMaximumExtent
,
sal_Bool
GDIMetaFile
::
CreateThumbnail
(
BitmapEx
&
rBmpEx
,
sal_uInt32
nMaximumExtent
)
const
const
BitmapEx
*
pOverlay
,
const
Rectangle
*
pOverlayRect
)
const
{
{
// initialization seems to be complicated but is used to avoid rounding errors
// initialization seems to be complicated but is used to avoid rounding errors
VirtualDevice
aVDev
;
VirtualDevice
aVDev
;
...
@@ -2909,45 +2908,19 @@ sal_Bool GDIMetaFile::CreateThumbnail(BitmapEx& rBmpEx, sal_uInt32 nMaximumExten
...
@@ -2909,45 +2908,19 @@ sal_Bool GDIMetaFile::CreateThumbnail(BitmapEx& rBmpEx, sal_uInt32 nMaximumExten
aDrawSize
.
Height
()
=
FRound
(
(
static_cast
<
double
>
(
aDrawSize
.
Height
()
)
*
aSizePix
.
Height
()
)
/
aOldSizePix
.
Height
()
);
aDrawSize
.
Height
()
=
FRound
(
(
static_cast
<
double
>
(
aDrawSize
.
Height
()
)
*
aSizePix
.
Height
()
)
/
aOldSizePix
.
Height
()
);
}
}
Size
aFullSize
;
Point
aBackPosPix
;
Rectangle
aOverlayRect
;
// calculate additional positions and sizes if an overlay image is used
if
(
pOverlay
)
{
aFullSize
=
Size
(
nMaximumExtent
,
nMaximumExtent
);
aOverlayRect
=
Rectangle
(
aNullPt
,
aFullSize
);
aOverlayRect
.
Intersection
(
pOverlayRect
?
*
pOverlayRect
:
Rectangle
(
aNullPt
,
pOverlay
->
GetSizePixel
()
)
);
if
(
!
aOverlayRect
.
IsEmpty
()
)
aBackPosPix
=
Point
(
(
nMaximumExtent
-
aSizePix
.
Width
()
)
>>
1
,
(
nMaximumExtent
-
aSizePix
.
Height
()
)
>>
1
);
else
pOverlay
=
NULL
;
}
else
{
aFullSize
=
aSizePix
;
pOverlay
=
NULL
;
}
// draw image(s) into VDev and get resulting image
// draw image(s) into VDev and get resulting image
// do it 4x larger to be able to scale it down & get beautiful antialias
// do it 4x larger to be able to scale it down & get beautiful antialias
Size
aAntialiasSize
(
a
FullSize
.
Width
()
*
4
,
aFullSize
.
Height
()
*
4
);
Size
aAntialiasSize
(
a
SizePix
.
Width
()
*
4
,
aSizePix
.
Height
()
*
4
);
if
(
aVDev
.
SetOutputSizePixel
(
aAntialiasSize
))
if
(
aVDev
.
SetOutputSizePixel
(
aAntialiasSize
))
{
{
// antialias: provide 4x larger size, and then scale down the result
// antialias: provide 4x larger size, and then scale down the result
Size
aAntialias
(
aDrawSize
.
Width
()
*
4
,
aDrawSize
.
Height
()
*
4
);
Size
aAntialias
(
aDrawSize
.
Width
()
*
4
,
aDrawSize
.
Height
()
*
4
);
// draw metafile into VDev
// draw metafile into VDev
Point
aBackPosPix
;
const_cast
<
GDIMetaFile
*>
(
this
)
->
WindStart
();
const_cast
<
GDIMetaFile
*>
(
this
)
->
WindStart
();
const_cast
<
GDIMetaFile
*>
(
this
)
->
Play
(
&
aVDev
,
aBackPosPix
,
aAntialias
);
const_cast
<
GDIMetaFile
*>
(
this
)
->
Play
(
&
aVDev
,
aBackPosPix
,
aAntialias
);
// draw overlay if necessary
if
(
pOverlay
)
aVDev
.
DrawBitmapEx
(
aOverlayRect
.
TopLeft
(),
aOverlayRect
.
GetSize
(),
*
pOverlay
);
// get paint bitmap
// get paint bitmap
Bitmap
aBmp
(
aVDev
.
GetBitmap
(
aNullPt
,
aVDev
.
GetOutputSizePixel
()
)
);
Bitmap
aBmp
(
aVDev
.
GetBitmap
(
aNullPt
,
aVDev
.
GetOutputSizePixel
()
)
);
...
...
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