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
d3b0f6bc
Kaydet (Commit)
d3b0f6bc
authored
Ock 19, 2016
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
always copying to a different bitmap
Change-Id: I90b205bef1b01e6c4c43788fc5c95391b7842e83
üst
1c217968
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
27 deletions
+6
-27
scaleimage.hxx
basebmp/inc/scaleimage.hxx
+5
-17
bitmapdevice.cxx
basebmp/source/bitmapdevice.cxx
+1
-7
bitmapdevice.hxx
include/basebmp/bitmapdevice.hxx
+0
-3
No files found.
basebmp/inc/scaleimage.hxx
Dosyayı görüntüle @
d3b0f6bc
...
@@ -104,10 +104,6 @@ void scaleLine( SourceIter s_begin,
...
@@ -104,10 +104,6 @@ void scaleLine( SourceIter s_begin,
@param d_acc
@param d_acc
Destination accessor
Destination accessor
@param bMustCopy
When true, scaleImage always copies source, even when doing 1:1
copy
*/
*/
template
<
class
SourceIter
,
class
SourceAcc
,
template
<
class
SourceIter
,
class
SourceAcc
,
class
DestIter
,
class
DestAcc
>
class
DestIter
,
class
DestAcc
>
...
@@ -116,8 +112,7 @@ void scaleImage( SourceIter s_begin,
...
@@ -116,8 +112,7 @@ void scaleImage( SourceIter s_begin,
SourceAcc
s_acc
,
SourceAcc
s_acc
,
DestIter
d_begin
,
DestIter
d_begin
,
DestIter
d_end
,
DestIter
d_end
,
DestAcc
d_acc
,
DestAcc
d_acc
)
bool
bMustCopy
=
false
)
{
{
const
int
src_width
(
s_end
.
x
-
s_begin
.
x
);
const
int
src_width
(
s_end
.
x
-
s_begin
.
x
);
const
int
src_height
(
s_end
.
y
-
s_begin
.
y
);
const
int
src_height
(
s_end
.
y
-
s_begin
.
y
);
...
@@ -125,9 +120,8 @@ void scaleImage( SourceIter s_begin,
...
@@ -125,9 +120,8 @@ void scaleImage( SourceIter s_begin,
const
int
dest_width
(
d_end
.
x
-
d_begin
.
x
);
const
int
dest_width
(
d_end
.
x
-
d_begin
.
x
);
const
int
dest_height
(
d_end
.
y
-
d_begin
.
y
);
const
int
dest_height
(
d_end
.
y
-
d_begin
.
y
);
if
(
!
bMustCopy
&&
if
(
src_width
==
dest_width
&&
src_width
==
dest_width
&&
src_height
==
dest_height
)
src_height
==
dest_height
)
{
{
// no scaling involved, can simply copy
// no scaling involved, can simply copy
vigra
::
copyImage
(
s_begin
,
s_end
,
s_acc
,
vigra
::
copyImage
(
s_begin
,
s_end
,
s_acc
,
...
@@ -166,20 +160,14 @@ void scaleImage( SourceIter s_begin,
...
@@ -166,20 +160,14 @@ void scaleImage( SourceIter s_begin,
}
}
/** Scale an image, range tuple version
/** Scale an image, range tuple version
@param bMustCopy
When true, scaleImage always copies source, even when doing 1:1
copy
*/
*/
template
<
class
SourceIter
,
class
SourceAcc
,
template
<
class
SourceIter
,
class
SourceAcc
,
class
DestIter
,
class
DestAcc
>
class
DestIter
,
class
DestAcc
>
inline
void
scaleImage
(
vigra
::
triple
<
SourceIter
,
SourceIter
,
SourceAcc
>
const
&
src
,
inline
void
scaleImage
(
vigra
::
triple
<
SourceIter
,
SourceIter
,
SourceAcc
>
const
&
src
,
vigra
::
triple
<
DestIter
,
DestIter
,
DestAcc
>
const
&
dst
,
vigra
::
triple
<
DestIter
,
DestIter
,
DestAcc
>
const
&
dst
)
bool
bMustCopy
=
false
)
{
{
scaleImage
(
src
.
first
,
src
.
second
,
src
.
third
,
scaleImage
(
src
.
first
,
src
.
second
,
src
.
third
,
dst
.
first
,
dst
.
second
,
dst
.
third
,
dst
.
first
,
dst
.
second
,
dst
.
third
);
bMustCopy
);
}
}
}
}
...
...
basebmp/source/bitmapdevice.cxx
Dosyayı görüntüle @
d3b0f6bc
...
@@ -248,8 +248,7 @@ namespace
...
@@ -248,8 +248,7 @@ namespace
aRect
),
aRect
),
destIterRange
(
begin
,
destIterRange
(
begin
,
acc
,
acc
,
aRect
),
aRect
));
isSharedBuffer
(
rSrcBitmap
)
);
}
}
template
<
typename
Iterator
,
typename
Acc
>
static
template
<
typename
Iterator
,
typename
Acc
>
static
...
@@ -425,11 +424,6 @@ PaletteMemorySharedVector BitmapDevice::getPalette() const
...
@@ -425,11 +424,6 @@ PaletteMemorySharedVector BitmapDevice::getPalette() const
return
mpImpl
->
mpPalette
;
return
mpImpl
->
mpPalette
;
}
}
bool
BitmapDevice
::
isSharedBuffer
(
const
BitmapDeviceSharedPtr
&
rOther
)
const
{
return
rOther
.
get
()
->
getBuffer
().
get
()
==
getBuffer
().
get
();
}
Color
BitmapDevice
::
getPixel
(
const
basegfx
::
B2IPoint
&
rPt
)
Color
BitmapDevice
::
getPixel
(
const
basegfx
::
B2IPoint
&
rPt
)
{
{
if
(
mpImpl
->
maBounds
.
isInside
(
rPt
)
)
if
(
mpImpl
->
maBounds
.
isInside
(
rPt
)
)
...
...
include/basebmp/bitmapdevice.hxx
Dosyayı görüntüle @
d3b0f6bc
...
@@ -100,9 +100,6 @@ public:
...
@@ -100,9 +100,6 @@ public:
*/
*/
PaletteMemorySharedVector
getPalette
()
const
;
PaletteMemorySharedVector
getPalette
()
const
;
/// Check if this and the other BitmapDevice share a buffer
bool
isSharedBuffer
(
const
BitmapDeviceSharedPtr
&
rOther
)
const
;
/** Get color value at given pixel
/** Get color value at given pixel
*/
*/
Color
getPixel
(
const
basegfx
::
B2IPoint
&
rPt
);
Color
getPixel
(
const
basegfx
::
B2IPoint
&
rPt
);
...
...
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