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
fde99610
Kaydet (Commit)
fde99610
authored
Agu 25, 2014
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
keep acc.set within clip bounds
Change-Id: I6af2eda03148dd400afa2f375b98e396ab0d5f3c
üst
9f482b59
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
12 deletions
+23
-12
clippedlinerenderer.hxx
include/basebmp/clippedlinerenderer.hxx
+23
-12
No files found.
include/basebmp/clippedlinerenderer.hxx
Dosyayı görüntüle @
fde99610
...
@@ -256,6 +256,12 @@ void renderClippedLine( basegfx::B2IPoint aPt1,
...
@@ -256,6 +256,12 @@ void renderClippedLine( basegfx::B2IPoint aPt1,
sal_Int32
xs
=
x1
;
sal_Int32
xs
=
x1
;
sal_Int32
ys
=
y1
;
sal_Int32
ys
=
y1
;
bool
bUseAlternateBresenham
=
false
;
bool
bUseAlternateBresenham
=
false
;
sal_Int32
nMinY
(
rClipRect
.
getMinY
());
sal_Int32
nMaxY
(
rClipRect
.
getMaxY
()
-
1
);
sal_Int32
nMinX
(
rClipRect
.
getMinX
());
sal_Int32
nMaxX
(
rClipRect
.
getMaxX
()
-
1
);
if
(
adx
>=
ady
)
if
(
adx
>=
ady
)
{
{
// semi-horizontal line
// semi-horizontal line
...
@@ -263,10 +269,10 @@ void renderClippedLine( basegfx::B2IPoint aPt1,
...
@@ -263,10 +269,10 @@ void renderClippedLine( basegfx::B2IPoint aPt1,
if
(
!
prepareClip
(
x1
,
x2
,
y1
,
adx
,
ady
,
xs
,
ys
,
sx
,
sy
,
if
(
!
prepareClip
(
x1
,
x2
,
y1
,
adx
,
ady
,
xs
,
ys
,
sx
,
sy
,
rem
,
n
,
clipCode1
,
clipCount1
,
clipCode2
,
clipCount2
,
rem
,
n
,
clipCode1
,
clipCount1
,
clipCode2
,
clipCount2
,
rClipRect
.
getMinX
()
,
basegfx
::
tools
::
RectClipFlags
::
LEFT
,
nMinX
,
basegfx
::
tools
::
RectClipFlags
::
LEFT
,
rClipRect
.
getMaxX
()
-
1
,
basegfx
::
tools
::
RectClipFlags
::
RIGHT
,
nMaxX
,
basegfx
::
tools
::
RectClipFlags
::
RIGHT
,
rClipRect
.
getMinY
()
,
basegfx
::
tools
::
RectClipFlags
::
TOP
,
nMinY
,
basegfx
::
tools
::
RectClipFlags
::
TOP
,
rClipRect
.
getMaxY
()
-
1
,
basegfx
::
tools
::
RectClipFlags
::
BOTTOM
,
nMaxY
,
basegfx
::
tools
::
RectClipFlags
::
BOTTOM
,
bRoundTowardsPt2
,
bUseAlternateBresenham
)
)
bRoundTowardsPt2
,
bUseAlternateBresenham
)
)
return
;
// line fully clipped away, no active pixel inside rect
return
;
// line fully clipped away, no active pixel inside rect
...
@@ -284,7 +290,8 @@ void renderClippedLine( basegfx::B2IPoint aPt1,
...
@@ -284,7 +290,8 @@ void renderClippedLine( basegfx::B2IPoint aPt1,
while
(
true
)
while
(
true
)
{
{
acc
.
set
(
color
,
rowIter
);
if
(
xs
>=
nMinX
&&
xs
<=
nMaxX
&&
ys
>=
nMinY
&&
ys
<=
nMaxY
)
acc
.
set
(
color
,
rowIter
);
if
(
rem
>=
0
)
if
(
rem
>=
0
)
{
{
...
@@ -313,7 +320,8 @@ void renderClippedLine( basegfx::B2IPoint aPt1,
...
@@ -313,7 +320,8 @@ void renderClippedLine( basegfx::B2IPoint aPt1,
{
{
while
(
true
)
while
(
true
)
{
{
acc
.
set
(
color
,
rowIter
);
if
(
xs
>=
nMinX
&&
xs
<=
nMaxX
&&
ys
>=
nMinY
&&
ys
<=
nMaxY
)
acc
.
set
(
color
,
rowIter
);
if
(
--
n
<
0
)
if
(
--
n
<
0
)
break
;
break
;
...
@@ -344,10 +352,10 @@ void renderClippedLine( basegfx::B2IPoint aPt1,
...
@@ -344,10 +352,10 @@ void renderClippedLine( basegfx::B2IPoint aPt1,
if
(
!
prepareClip
(
y1
,
y2
,
x1
,
ady
,
adx
,
ys
,
xs
,
sy
,
sx
,
if
(
!
prepareClip
(
y1
,
y2
,
x1
,
ady
,
adx
,
ys
,
xs
,
sy
,
sx
,
rem
,
n
,
clipCode1
,
clipCount1
,
clipCode2
,
clipCount2
,
rem
,
n
,
clipCode1
,
clipCount1
,
clipCode2
,
clipCount2
,
rClipRect
.
getMinY
()
,
basegfx
::
tools
::
RectClipFlags
::
TOP
,
nMinY
,
basegfx
::
tools
::
RectClipFlags
::
TOP
,
rClipRect
.
getMaxY
()
-
1
,
basegfx
::
tools
::
RectClipFlags
::
BOTTOM
,
nMaxY
,
basegfx
::
tools
::
RectClipFlags
::
BOTTOM
,
rClipRect
.
getMinX
()
,
basegfx
::
tools
::
RectClipFlags
::
LEFT
,
nMinX
,
basegfx
::
tools
::
RectClipFlags
::
LEFT
,
rClipRect
.
getMaxX
()
-
1
,
basegfx
::
tools
::
RectClipFlags
::
RIGHT
,
nMaxY
,
basegfx
::
tools
::
RectClipFlags
::
RIGHT
,
bRoundTowardsPt2
,
bUseAlternateBresenham
)
)
bRoundTowardsPt2
,
bUseAlternateBresenham
)
)
return
;
// line fully clipped away, no active pixel inside rect
return
;
// line fully clipped away, no active pixel inside rect
...
@@ -365,7 +373,8 @@ void renderClippedLine( basegfx::B2IPoint aPt1,
...
@@ -365,7 +373,8 @@ void renderClippedLine( basegfx::B2IPoint aPt1,
while
(
true
)
while
(
true
)
{
{
acc
.
set
(
color
,
colIter
);
if
(
xs
>=
nMinX
&&
xs
<=
nMaxX
&&
ys
>=
nMinY
&&
ys
<=
nMaxY
)
acc
.
set
(
color
,
colIter
);
if
(
rem
>=
0
)
if
(
rem
>=
0
)
{
{
...
@@ -376,6 +385,7 @@ void renderClippedLine( basegfx::B2IPoint aPt1,
...
@@ -376,6 +385,7 @@ void renderClippedLine( basegfx::B2IPoint aPt1,
xs
+=
sx
;
xs
+=
sx
;
ys
+=
sy
;
ys
+=
sy
;
rem
-=
ady
;
rem
-=
ady
;
currIter
.
x
+=
sx
;
currIter
.
x
+=
sx
;
...
@@ -394,7 +404,8 @@ void renderClippedLine( basegfx::B2IPoint aPt1,
...
@@ -394,7 +404,8 @@ void renderClippedLine( basegfx::B2IPoint aPt1,
{
{
while
(
true
)
while
(
true
)
{
{
acc
.
set
(
color
,
colIter
);
if
(
xs
>=
nMinX
&&
xs
<=
nMaxX
&&
ys
>=
nMinY
&&
ys
<=
nMaxY
)
acc
.
set
(
color
,
colIter
);
if
(
--
n
<
0
)
if
(
--
n
<
0
)
break
;
break
;
...
...
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