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
704e5abb
Kaydet (Commit)
704e5abb
authored
Nis 22, 2014
tarafından
Chris Sherlock
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Move bitmap functions in header, warn if calling GetBitmap() in Printer
Change-Id: Id2325822730d3d9167706c8c4118eaa3ca727195
üst
1893ca5f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
31 deletions
+27
-31
outdev.hxx
include/vcl/outdev.hxx
+17
-13
print.hxx
include/vcl/print.hxx
+1
-15
print.cxx
vcl/source/gdi/print.cxx
+8
-0
bitmap.cxx
vcl/source/outdev/bitmap.cxx
+1
-3
No files found.
include/vcl/outdev.hxx
Dosyayı görüntüle @
704e5abb
...
@@ -544,19 +544,13 @@ public:
...
@@ -544,19 +544,13 @@ public:
SAL_DLLPRIVATE
void
ImplDrawBitmapWallpaper
(
long
nX
,
long
nY
,
long
nWidth
,
long
nHeight
,
const
Wallpaper
&
rWallpaper
);
SAL_DLLPRIVATE
void
ImplDrawBitmapWallpaper
(
long
nX
,
long
nY
,
long
nWidth
,
long
nHeight
,
const
Wallpaper
&
rWallpaper
);
///@}
///@}
/** @name Bitmap functions
*/
///@{
SAL_DLLPRIVATE
void
ImplDrawOutDevDirect
(
const
OutputDevice
*
pSrcDev
,
SalTwoRect
&
rPosAry
);
SAL_DLLPRIVATE
void
ImplDrawOutDevDirect
(
const
OutputDevice
*
pSrcDev
,
SalTwoRect
&
rPosAry
);
SAL_DLLPRIVATE
void
DrawAlphaBitmap
(
const
Bitmap
&
rBmp
,
const
AlphaMask
&
rAlpha
,
const
Point
&
rDestPt
,
const
Size
&
rDestSize
,
const
Point
&
rSrcPtPixel
,
const
Size
&
rSrcSizePixel
);
virtual
void
ClipToPaintRegion
(
Rectangle
&
rDstRect
);
virtual
void
ClipToPaintRegion
(
Rectangle
&
rDstRect
);
SAL_DLLPRIVATE
void
ImplPrintTransparent
(
const
Bitmap
&
rBmp
,
const
Bitmap
&
rMask
,
SAL_DLLPRIVATE
void
ImplPrintTransparent
(
const
Bitmap
&
rBmp
,
const
Bitmap
&
rMask
,
const
Point
&
rDestPt
,
const
Size
&
rDestSize
,
const
Point
&
rDestPt
,
const
Size
&
rDestSize
,
const
Point
&
rSrcPtPixel
,
const
Size
&
rSrcSizePixel
);
const
Point
&
rSrcPtPixel
,
const
Size
&
rSrcSizePixel
);
SAL_DLLPRIVATE
Color
ImplDrawModeToColor
(
const
Color
&
rColor
)
const
;
SAL_DLLPRIVATE
Color
ImplDrawModeToColor
(
const
Color
&
rColor
)
const
;
///@}
/** @name Frame functions
/** @name Frame functions
*/
*/
...
@@ -861,6 +855,13 @@ public:
...
@@ -861,6 +855,13 @@ public:
const
Image
&
rImage
,
const
Image
&
rImage
,
sal_uInt16
nStyle
=
0
);
sal_uInt16
nStyle
=
0
);
virtual
Bitmap
GetBitmap
(
const
Point
&
rSrcPt
,
const
Size
&
rSize
)
const
;
/** Query extended bitmap (with alpha channel, if available).
*/
BitmapEx
GetBitmapEx
(
const
Point
&
rSrcPt
,
const
Size
&
rSize
)
const
;
/** Retrieve downsampled and cropped bitmap
/** Retrieve downsampled and cropped bitmap
@attention This method ignores negative rDstSz values, thus
@attention This method ignores negative rDstSz values, thus
...
@@ -926,6 +927,15 @@ protected:
...
@@ -926,6 +927,15 @@ protected:
const
Point
&
rSrcPtPixel
,
const
Size
&
rSrcSizePixel
,
const
Point
&
rSrcPtPixel
,
const
Size
&
rSrcSizePixel
,
BitmapEx
&
rBitmapEx
);
BitmapEx
&
rBitmapEx
);
private
:
private
:
SAL_DLLPRIVATE
void
DrawAlphaBitmap
(
const
Bitmap
&
rBmp
,
const
AlphaMask
&
rAlpha
,
const
Point
&
rDestPt
,
const
Size
&
rDestSize
,
const
Point
&
rSrcPtPixel
,
const
Size
&
rSrcSizePixel
);
SAL_DLLPRIVATE
Bitmap
BlendBitmap
(
SAL_DLLPRIVATE
Bitmap
BlendBitmap
(
Bitmap
aBmp
,
Bitmap
aBmp
,
BitmapReadAccess
*
pP
,
BitmapReadAccess
*
pP
,
...
@@ -1503,12 +1513,6 @@ public:
...
@@ -1503,12 +1513,6 @@ public:
Color
GetPixel
(
const
Point
&
rPt
)
const
;
Color
GetPixel
(
const
Point
&
rPt
)
const
;
Bitmap
GetBitmap
(
const
Point
&
rSrcPt
,
const
Size
&
rSize
)
const
;
/** Query extended bitmap (with alpha channel, if available).
*/
BitmapEx
GetBitmapEx
(
const
Point
&
rSrcPt
,
const
Size
&
rSize
)
const
;
// Enabling/disabling RTL only makes sense for OutputDevices that use a mirroring SalGraphisLayout
// Enabling/disabling RTL only makes sense for OutputDevices that use a mirroring SalGraphisLayout
virtual
void
EnableRTL
(
bool
bEnable
=
true
);
virtual
void
EnableRTL
(
bool
bEnable
=
true
);
bool
IsRTLEnabled
()
const
{
return
mbEnableRTL
;
}
bool
IsRTLEnabled
()
const
{
return
mbEnableRTL
;
}
...
...
include/vcl/print.hxx
Dosyayı görüntüle @
704e5abb
...
@@ -51,9 +51,6 @@ namespace vcl {
...
@@ -51,9 +51,6 @@ namespace vcl {
}
}
// - Printer-Types -
#define PAGEQUEUE_ALLPAGES 0xFFFF
#define PAGEQUEUE_ALLPAGES 0xFFFF
enum
PrinterSupport
{
SUPPORT_SET_ORIENTATION
,
SUPPORT_SET_PAPERBIN
,
enum
PrinterSupport
{
SUPPORT_SET_ORIENTATION
,
SUPPORT_SET_PAPERBIN
,
...
@@ -62,9 +59,6 @@ enum PrinterSupport { SUPPORT_SET_ORIENTATION, SUPPORT_SET_PAPERBIN,
...
@@ -62,9 +59,6 @@ enum PrinterSupport { SUPPORT_SET_ORIENTATION, SUPPORT_SET_PAPERBIN,
SUPPORT_SETUPDIALOG
,
SUPPORT_FAX
,
SUPPORT_PDF
};
SUPPORT_SETUPDIALOG
,
SUPPORT_FAX
,
SUPPORT_PDF
};
// - PrinterPage -
class
VCL_DLLPUBLIC
PrinterPage
class
VCL_DLLPUBLIC
PrinterPage
{
{
GDIMetaFile
*
mpMtf
;
GDIMetaFile
*
mpMtf
;
...
@@ -85,9 +79,6 @@ public:
...
@@ -85,9 +79,6 @@ public:
// - QueueInfo -
class
VCL_DLLPUBLIC
QueueInfo
class
VCL_DLLPUBLIC
QueueInfo
{
{
friend
class
Printer
;
friend
class
Printer
;
...
@@ -119,9 +110,6 @@ public:
...
@@ -119,9 +110,6 @@ public:
};
};
// - PrinterOptions -
enum
PrinterTransparencyMode
enum
PrinterTransparencyMode
{
{
PRINTER_TRANSPARENCY_AUTO
=
0
,
PRINTER_TRANSPARENCY_AUTO
=
0
,
...
@@ -208,9 +196,6 @@ public:
...
@@ -208,9 +196,6 @@ public:
};
};
// - Printer -
class
VCL_DLLPUBLIC
Printer
:
public
OutputDevice
class
VCL_DLLPUBLIC
Printer
:
public
OutputDevice
{
{
friend
class
OutputDevice
;
friend
class
OutputDevice
;
...
@@ -278,6 +263,7 @@ protected:
...
@@ -278,6 +263,7 @@ protected:
public
:
public
:
void
DrawGradientEx
(
OutputDevice
*
pOut
,
const
Rectangle
&
rRect
,
const
Gradient
&
rGradient
);
void
DrawGradientEx
(
OutputDevice
*
pOut
,
const
Rectangle
&
rRect
,
const
Gradient
&
rGradient
);
virtual
Bitmap
GetBitmap
(
const
Point
&
rSrcPt
,
const
Size
&
rSize
)
const
SAL_OVERRIDE
;
protected
:
protected
:
...
...
vcl/source/gdi/print.cxx
Dosyayı görüntüle @
704e5abb
...
@@ -1844,4 +1844,12 @@ void Printer::DrawImage( const Point&, const Size&, const Image&, sal_uInt16 )
...
@@ -1844,4 +1844,12 @@ void Printer::DrawImage( const Point&, const Size&, const Image&, sal_uInt16 )
assert
(
false
);
assert
(
false
);
}
}
Bitmap
Printer
::
GetBitmap
(
const
Point
&
rSrcPt
,
const
Size
&
rSize
)
const
{
SAL_WARN
(
"vcl.gdi"
,
"GetBitmap(): This should never be called on by a Printer instance"
);
return
OutputDevice
::
GetBitmap
(
rSrcPt
,
rSize
);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
vcl/source/outdev/bitmap.cxx
Dosyayı görüntüle @
704e5abb
...
@@ -474,7 +474,7 @@ bool OutputDevice::TransformAndReduceBitmapExToTargetRange(
...
@@ -474,7 +474,7 @@ bool OutputDevice::TransformAndReduceBitmapExToTargetRange(
aVisibleRange
.
transform
(
aMakeVisibleRangeRelative
);
aVisibleRange
.
transform
(
aMakeVisibleRangeRelative
);
}
}
// for pixel devices, do *not* limit size, else OutputDevice::
ImplDrawAlpha
// for pixel devices, do *not* limit size, else OutputDevice::
DrawAlphaBitmap
// will create another, badly scaled bitmap to do the job. Nonetheless, do a
// will create another, badly scaled bitmap to do the job. Nonetheless, do a
// maximum clipping of something big (1600x1280x2). Add 1.0 to avoid rounding
// maximum clipping of something big (1600x1280x2). Add 1.0 to avoid rounding
// errors in rough estimations
// errors in rough estimations
...
@@ -880,8 +880,6 @@ void OutputDevice::DrawImage( const Point& rPos, const Size& rSize,
...
@@ -880,8 +880,6 @@ void OutputDevice::DrawImage( const Point& rPos, const Size& rSize,
Bitmap
OutputDevice
::
GetBitmap
(
const
Point
&
rSrcPt
,
const
Size
&
rSize
)
const
Bitmap
OutputDevice
::
GetBitmap
(
const
Point
&
rSrcPt
,
const
Size
&
rSize
)
const
{
{
OSL_ENSURE
(
OUTDEV_PRINTER
!=
GetOutDevType
(),
"OutputDevice::GetBitmap with sorce type OUTDEV_PRINTER should not be used (!)"
);
Bitmap
aBmp
;
Bitmap
aBmp
;
long
nX
=
ImplLogicXToDevicePixel
(
rSrcPt
.
X
()
);
long
nX
=
ImplLogicXToDevicePixel
(
rSrcPt
.
X
()
);
long
nY
=
ImplLogicYToDevicePixel
(
rSrcPt
.
Y
()
);
long
nY
=
ImplLogicYToDevicePixel
(
rSrcPt
.
Y
()
);
...
...
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