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
db45e761
Kaydet (Commit)
db45e761
authored
Nis 28, 2014
tarafından
Chris Sherlock
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
VCL move DrawGrid from polygon.cxx to rect.cxx
Change-Id: I551901111ee8eee2a9c1cf75890b89f7100d925d
üst
5416bef7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
99 additions
and
99 deletions
+99
-99
polygon.cxx
vcl/source/outdev/polygon.cxx
+0
-99
rect.cxx
vcl/source/outdev/rect.cxx
+99
-0
No files found.
vcl/source/outdev/polygon.cxx
Dosyayı görüntüle @
db45e761
...
@@ -479,103 +479,4 @@ void OutputDevice::ImplDrawPolyPolygon( const PolyPolygon& rPolyPoly, const Poly
...
@@ -479,103 +479,4 @@ void OutputDevice::ImplDrawPolyPolygon( const PolyPolygon& rPolyPoly, const Poly
delete
pPolyPoly
;
delete
pPolyPoly
;
}
}
void
OutputDevice
::
DrawGrid
(
const
Rectangle
&
rRect
,
const
Size
&
rDist
,
sal_uLong
nFlags
)
{
Rectangle
aDstRect
(
PixelToLogic
(
Point
()
),
GetOutputSize
()
);
aDstRect
.
Intersection
(
rRect
);
if
(
aDstRect
.
IsEmpty
()
||
ImplIsRecordLayout
()
)
return
;
if
(
!
mpGraphics
&&
!
AcquireGraphics
()
)
return
;
if
(
mbInitClipRegion
)
InitClipRegion
();
if
(
mbOutputClipped
)
return
;
const
long
nDistX
=
std
::
max
(
rDist
.
Width
(),
1L
);
const
long
nDistY
=
std
::
max
(
rDist
.
Height
(),
1L
);
long
nX
=
(
rRect
.
Left
()
>=
aDstRect
.
Left
()
)
?
rRect
.
Left
()
:
(
rRect
.
Left
()
+
(
(
aDstRect
.
Left
()
-
rRect
.
Left
()
)
/
nDistX
)
*
nDistX
);
long
nY
=
(
rRect
.
Top
()
>=
aDstRect
.
Top
()
)
?
rRect
.
Top
()
:
(
rRect
.
Top
()
+
(
(
aDstRect
.
Top
()
-
rRect
.
Top
()
)
/
nDistY
)
*
nDistY
);
const
long
nRight
=
aDstRect
.
Right
();
const
long
nBottom
=
aDstRect
.
Bottom
();
const
long
nStartX
=
ImplLogicXToDevicePixel
(
nX
);
const
long
nEndX
=
ImplLogicXToDevicePixel
(
nRight
);
const
long
nStartY
=
ImplLogicYToDevicePixel
(
nY
);
const
long
nEndY
=
ImplLogicYToDevicePixel
(
nBottom
);
long
nHorzCount
=
0L
;
long
nVertCount
=
0L
;
css
::
uno
::
Sequence
<
sal_Int32
>
aVertBuf
;
css
::
uno
::
Sequence
<
sal_Int32
>
aHorzBuf
;
if
(
(
nFlags
&
GRID_DOTS
)
||
(
nFlags
&
GRID_HORZLINES
)
)
{
aVertBuf
.
realloc
(
aDstRect
.
GetHeight
()
/
nDistY
+
2L
);
aVertBuf
[
nVertCount
++
]
=
nStartY
;
while
(
(
nY
+=
nDistY
)
<=
nBottom
)
{
aVertBuf
[
nVertCount
++
]
=
ImplLogicYToDevicePixel
(
nY
);
}
}
if
(
(
nFlags
&
GRID_DOTS
)
||
(
nFlags
&
GRID_VERTLINES
)
)
{
aHorzBuf
.
realloc
(
aDstRect
.
GetWidth
()
/
nDistX
+
2L
);
aHorzBuf
[
nHorzCount
++
]
=
nStartX
;
while
(
(
nX
+=
nDistX
)
<=
nRight
)
{
aHorzBuf
[
nHorzCount
++
]
=
ImplLogicXToDevicePixel
(
nX
);
}
}
if
(
mbInitLineColor
)
InitLineColor
();
if
(
mbInitFillColor
)
InitFillColor
();
const
bool
bOldMap
=
mbMap
;
EnableMapMode
(
false
);
if
(
nFlags
&
GRID_DOTS
)
{
for
(
long
i
=
0L
;
i
<
nVertCount
;
i
++
)
{
for
(
long
j
=
0L
,
Y
=
aVertBuf
[
i
];
j
<
nHorzCount
;
j
++
)
{
mpGraphics
->
DrawPixel
(
aHorzBuf
[
j
],
Y
,
this
);
}
}
}
else
{
if
(
nFlags
&
GRID_HORZLINES
)
{
for
(
long
i
=
0L
;
i
<
nVertCount
;
i
++
)
{
nY
=
aVertBuf
[
i
];
mpGraphics
->
DrawLine
(
nStartX
,
nY
,
nEndX
,
nY
,
this
);
}
}
if
(
nFlags
&
GRID_VERTLINES
)
{
for
(
long
i
=
0L
;
i
<
nHorzCount
;
i
++
)
{
nX
=
aHorzBuf
[
i
];
mpGraphics
->
DrawLine
(
nX
,
nStartY
,
nX
,
nEndY
,
this
);
}
}
}
EnableMapMode
(
bOldMap
);
if
(
mpAlphaVDev
)
mpAlphaVDev
->
DrawGrid
(
rRect
,
rDist
,
nFlags
);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
vcl/source/outdev/rect.cxx
Dosyayı görüntüle @
db45e761
...
@@ -121,6 +121,105 @@ void OutputDevice::DrawRect( const Rectangle& rRect,
...
@@ -121,6 +121,105 @@ void OutputDevice::DrawRect( const Rectangle& rRect,
mpAlphaVDev
->
DrawRect
(
rRect
,
nHorzRound
,
nVertRound
);
mpAlphaVDev
->
DrawRect
(
rRect
,
nHorzRound
,
nVertRound
);
}
}
void
OutputDevice
::
DrawGrid
(
const
Rectangle
&
rRect
,
const
Size
&
rDist
,
sal_uLong
nFlags
)
{
Rectangle
aDstRect
(
PixelToLogic
(
Point
()
),
GetOutputSize
()
);
aDstRect
.
Intersection
(
rRect
);
if
(
aDstRect
.
IsEmpty
()
||
ImplIsRecordLayout
()
)
return
;
if
(
!
mpGraphics
&&
!
AcquireGraphics
()
)
return
;
if
(
mbInitClipRegion
)
InitClipRegion
();
if
(
mbOutputClipped
)
return
;
const
long
nDistX
=
std
::
max
(
rDist
.
Width
(),
1L
);
const
long
nDistY
=
std
::
max
(
rDist
.
Height
(),
1L
);
long
nX
=
(
rRect
.
Left
()
>=
aDstRect
.
Left
()
)
?
rRect
.
Left
()
:
(
rRect
.
Left
()
+
(
(
aDstRect
.
Left
()
-
rRect
.
Left
()
)
/
nDistX
)
*
nDistX
);
long
nY
=
(
rRect
.
Top
()
>=
aDstRect
.
Top
()
)
?
rRect
.
Top
()
:
(
rRect
.
Top
()
+
(
(
aDstRect
.
Top
()
-
rRect
.
Top
()
)
/
nDistY
)
*
nDistY
);
const
long
nRight
=
aDstRect
.
Right
();
const
long
nBottom
=
aDstRect
.
Bottom
();
const
long
nStartX
=
ImplLogicXToDevicePixel
(
nX
);
const
long
nEndX
=
ImplLogicXToDevicePixel
(
nRight
);
const
long
nStartY
=
ImplLogicYToDevicePixel
(
nY
);
const
long
nEndY
=
ImplLogicYToDevicePixel
(
nBottom
);
long
nHorzCount
=
0L
;
long
nVertCount
=
0L
;
css
::
uno
::
Sequence
<
sal_Int32
>
aVertBuf
;
css
::
uno
::
Sequence
<
sal_Int32
>
aHorzBuf
;
if
(
(
nFlags
&
GRID_DOTS
)
||
(
nFlags
&
GRID_HORZLINES
)
)
{
aVertBuf
.
realloc
(
aDstRect
.
GetHeight
()
/
nDistY
+
2L
);
aVertBuf
[
nVertCount
++
]
=
nStartY
;
while
(
(
nY
+=
nDistY
)
<=
nBottom
)
{
aVertBuf
[
nVertCount
++
]
=
ImplLogicYToDevicePixel
(
nY
);
}
}
if
(
(
nFlags
&
GRID_DOTS
)
||
(
nFlags
&
GRID_VERTLINES
)
)
{
aHorzBuf
.
realloc
(
aDstRect
.
GetWidth
()
/
nDistX
+
2L
);
aHorzBuf
[
nHorzCount
++
]
=
nStartX
;
while
(
(
nX
+=
nDistX
)
<=
nRight
)
{
aHorzBuf
[
nHorzCount
++
]
=
ImplLogicXToDevicePixel
(
nX
);
}
}
if
(
mbInitLineColor
)
InitLineColor
();
if
(
mbInitFillColor
)
InitFillColor
();
const
bool
bOldMap
=
mbMap
;
EnableMapMode
(
false
);
if
(
nFlags
&
GRID_DOTS
)
{
for
(
long
i
=
0L
;
i
<
nVertCount
;
i
++
)
{
for
(
long
j
=
0L
,
Y
=
aVertBuf
[
i
];
j
<
nHorzCount
;
j
++
)
{
mpGraphics
->
DrawPixel
(
aHorzBuf
[
j
],
Y
,
this
);
}
}
}
else
{
if
(
nFlags
&
GRID_HORZLINES
)
{
for
(
long
i
=
0L
;
i
<
nVertCount
;
i
++
)
{
nY
=
aVertBuf
[
i
];
mpGraphics
->
DrawLine
(
nStartX
,
nY
,
nEndX
,
nY
,
this
);
}
}
if
(
nFlags
&
GRID_VERTLINES
)
{
for
(
long
i
=
0L
;
i
<
nHorzCount
;
i
++
)
{
nX
=
aHorzBuf
[
i
];
mpGraphics
->
DrawLine
(
nX
,
nStartY
,
nX
,
nEndY
,
this
);
}
}
}
EnableMapMode
(
bOldMap
);
if
(
mpAlphaVDev
)
mpAlphaVDev
->
DrawGrid
(
rRect
,
rDist
,
nFlags
);
}
sal_uLong
AdjustTwoRect
(
SalTwoRect
&
rTwoRect
,
const
Size
&
rSizePix
)
sal_uLong
AdjustTwoRect
(
SalTwoRect
&
rTwoRect
,
const
Size
&
rSizePix
)
{
{
sal_uLong
nMirrFlags
=
0
;
sal_uLong
nMirrFlags
=
0
;
...
...
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