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
b7442df1
Kaydet (Commit)
b7442df1
authored
Tem 26, 2011
tarafından
Thomas Arnhold
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
callcatcher: clean up ImplImageBmp
üst
bc34a22e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
158 deletions
+0
-158
image.h
vcl/inc/image.h
+0
-13
impimage.cxx
vcl/source/gdi/impimage.cxx
+0
-145
No files found.
vcl/inc/image.h
Dosyayı görüntüle @
b7442df1
...
...
@@ -44,21 +44,8 @@ public:
ImplImageBmp
();
~
ImplImageBmp
();
void
Create
(
long
nItemWidth
,
long
nItemHeight
,
sal_uInt16
nInitSize
);
void
Create
(
const
BitmapEx
&
rBmpEx
,
long
nItemWidth
,
long
nItemHeight
,
sal_uInt16
nInitSize
);
void
Expand
(
sal_uInt16
nGrowSize
);
void
Replace
(
sal_uInt16
nPos
,
sal_uInt16
nSrcPos
);
void
Replace
(
sal_uInt16
nPos
,
const
ImplImageBmp
&
rImageBmp
,
sal_uInt16
nSrcPos
);
void
Replace
(
sal_uInt16
nPos
,
const
BitmapEx
&
rBmpEx
);
void
ReplaceColors
(
const
Color
*
pSrcColors
,
const
Color
*
pDstColors
,
sal_uIntPtr
nColorCount
);
void
ColorTransform
();
void
Invert
();
BitmapEx
GetBitmapEx
(
sal_uInt16
nPosCount
,
sal_uInt16
*
pPosAry
)
const
;
void
Draw
(
sal_uInt16
nPos
,
OutputDevice
*
pDev
,
const
Point
&
rPos
,
sal_uInt16
nStyle
,
const
Size
*
pSize
=
NULL
);
private
:
...
...
vcl/source/gdi/impimage.cxx
Dosyayı görüntüle @
b7442df1
...
...
@@ -214,26 +214,6 @@ ImplImageBmp::~ImplImageBmp()
// -----------------------------------------------------------------------
void
ImplImageBmp
::
Create
(
long
nItemWidth
,
long
nItemHeight
,
sal_uInt16
nInitSize
)
{
const
Size
aTotalSize
(
nInitSize
*
nItemWidth
,
nItemHeight
);
maBmpEx
=
Bitmap
(
aTotalSize
,
24
);
maDisabledBmpEx
.
SetEmpty
();
delete
mpDisplayBmp
;
mpDisplayBmp
=
NULL
;
maSize
=
Size
(
nItemWidth
,
nItemHeight
);
mnSize
=
nInitSize
;
delete
[]
mpInfoAry
;
mpInfoAry
=
new
sal_uInt8
[
mnSize
];
memset
(
mpInfoAry
,
0
,
mnSize
);
}
// -----------------------------------------------------------------------
void
ImplImageBmp
::
Create
(
const
BitmapEx
&
rBmpEx
,
long
nItemWidth
,
long
nItemHeight
,
sal_uInt16
nInitSize
)
{
maBmpEx
=
rBmpEx
;
...
...
@@ -254,131 +234,6 @@ void ImplImageBmp::Create( const BitmapEx& rBmpEx, long nItemWidth, long nItemHe
// -----------------------------------------------------------------------
void
ImplImageBmp
::
Expand
(
sal_uInt16
nGrowSize
)
{
const
sal_uLong
nDX
=
nGrowSize
*
maSize
.
Width
();
const
sal_uInt16
nOldSize
=
mnSize
;
sal_uInt8
*
pNewAry
=
new
sal_uInt8
[
mnSize
=
sal
::
static_int_cast
<
sal_uInt16
>
(
mnSize
+
nGrowSize
)
];
maBmpEx
.
Expand
(
nDX
,
0UL
);
if
(
!
maDisabledBmpEx
.
IsEmpty
()
)
maDisabledBmpEx
.
Expand
(
nDX
,
0UL
);
delete
mpDisplayBmp
;
mpDisplayBmp
=
NULL
;
memset
(
pNewAry
,
0
,
mnSize
);
memcpy
(
pNewAry
,
mpInfoAry
,
nOldSize
);
delete
[]
mpInfoAry
;
mpInfoAry
=
pNewAry
;
}
// -----------------------------------------------------------------------
void
ImplImageBmp
::
Invert
()
{
delete
mpDisplayBmp
;
mpDisplayBmp
=
NULL
;
maBmpEx
.
Invert
();
}
// -----------------------------------------------------------------------
void
ImplImageBmp
::
Replace
(
sal_uInt16
nPos
,
sal_uInt16
nSrcPos
)
{
const
Point
aSrcPos
(
nSrcPos
*
maSize
.
Width
(),
0L
),
aPos
(
nPos
*
maSize
.
Width
(),
0L
);
const
Rectangle
aSrcRect
(
aSrcPos
,
maSize
);
const
Rectangle
aDstRect
(
aPos
,
maSize
);
maBmpEx
.
CopyPixel
(
aDstRect
,
aSrcRect
);
if
(
!
maDisabledBmpEx
.
IsEmpty
()
)
maDisabledBmpEx
.
CopyPixel
(
aDstRect
,
aSrcRect
);
delete
mpDisplayBmp
;
mpDisplayBmp
=
NULL
;
mpInfoAry
[
nPos
]
=
mpInfoAry
[
nSrcPos
];
}
// -----------------------------------------------------------------------
void
ImplImageBmp
::
Replace
(
sal_uInt16
nPos
,
const
ImplImageBmp
&
rImageBmp
,
sal_uInt16
nSrcPos
)
{
const
Point
aSrcPos
(
nSrcPos
*
maSize
.
Width
(),
0L
),
aPos
(
nPos
*
maSize
.
Width
(),
0L
);
const
Rectangle
aSrcRect
(
aSrcPos
,
maSize
);
const
Rectangle
aDstRect
(
aPos
,
maSize
);
maBmpEx
.
CopyPixel
(
aDstRect
,
aSrcRect
,
&
rImageBmp
.
maBmpEx
);
ImplUpdateDisabledBmpEx
(
nPos
);
delete
mpDisplayBmp
;
mpDisplayBmp
=
NULL
;
mpInfoAry
[
nPos
]
=
rImageBmp
.
mpInfoAry
[
nSrcPos
];
}
// -----------------------------------------------------------------------
void
ImplImageBmp
::
Replace
(
sal_uInt16
nPos
,
const
BitmapEx
&
rBmpEx
)
{
const
Point
aNullPos
,
aPos
(
nPos
*
maSize
.
Width
(),
0L
);
const
Rectangle
aSrcRect
(
aNullPos
,
maSize
);
const
Rectangle
aDstRect
(
aPos
,
maSize
);
maBmpEx
.
CopyPixel
(
aDstRect
,
aSrcRect
,
&
rBmpEx
);
ImplUpdateDisabledBmpEx
(
nPos
);
delete
mpDisplayBmp
;
mpDisplayBmp
=
NULL
;
mpInfoAry
[
nPos
]
&=
~
(
IMPSYSIMAGEITEM_MASK
|
IMPSYSIMAGEITEM_ALPHA
);
mpInfoAry
[
nPos
]
|=
(
rBmpEx
.
IsAlpha
()
?
IMPSYSIMAGEITEM_ALPHA
:
(
rBmpEx
.
IsTransparent
()
?
IMPSYSIMAGEITEM_MASK
:
0
)
);
}
// -----------------------------------------------------------------------
void
ImplImageBmp
::
ReplaceColors
(
const
Color
*
pSrcColors
,
const
Color
*
pDstColors
,
sal_uLong
nColorCount
)
{
maBmpEx
.
Replace
(
pSrcColors
,
pDstColors
,
nColorCount
);
delete
mpDisplayBmp
;
mpDisplayBmp
=
NULL
;
}
// -----------------------------------------------------------------------
BitmapEx
ImplImageBmp
::
GetBitmapEx
(
sal_uInt16
nPosCount
,
sal_uInt16
*
pPosAry
)
const
{
const
Bitmap
aNewBmp
(
Size
(
nPosCount
*
maSize
.
Width
(),
maSize
.
Height
()
),
maBmpEx
.
GetBitmap
().
GetBitCount
()
);
BitmapEx
aRet
;
if
(
maBmpEx
.
IsAlpha
()
)
{
// initialize target bitmap with an empty alpha mask
// which allows for using an optimized copypixel later on (see AlphaMask::CopyPixel)
// that avoids palette lookups
AlphaMask
aAlpha
(
Size
(
nPosCount
*
maSize
.
Width
(),
maSize
.
Height
()
)
);
aRet
=
BitmapEx
(
aNewBmp
,
aAlpha
);
}
else
aRet
=
BitmapEx
(
aNewBmp
);
for
(
sal_uInt16
i
=
0
;
i
<
nPosCount
;
i
++
)
{
const
Point
aSrcPos
(
pPosAry
[
i
]
*
maSize
.
Width
(),
0L
);
const
Point
aPos
(
i
*
maSize
.
Width
(),
0L
);
const
Rectangle
aSrcRect
(
aSrcPos
,
maSize
);
const
Rectangle
aDstRect
(
aPos
,
maSize
);
aRet
.
CopyPixel
(
aDstRect
,
aSrcRect
,
&
maBmpEx
);
}
return
aRet
;
}
// -----------------------------------------------------------------------
void
ImplImageBmp
::
Draw
(
sal_uInt16
nPos
,
OutputDevice
*
pOutDev
,
const
Point
&
rPos
,
sal_uInt16
nStyle
,
const
Size
*
pSize
)
...
...
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