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
b57f9217
Kaydet (Commit)
b57f9217
authored
Ock 09, 2014
tarafından
Armin Le Grand
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
i124002 use own logical size for graphics, do not adapt PrefSize of these in rendering stack
üst
c15b814d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
12 deletions
+36
-12
sdrfillgraphicattribute.hxx
...er/inc/drawinglayer/attribute/sdrfillgraphicattribute.hxx
+2
-0
sdrfillgraphicattribute.cxx
drawinglayer/source/attribute/sdrfillgraphicattribute.cxx
+19
-3
sdrattributecreator.cxx
svx/source/sdr/primitive2d/sdrattributecreator.cxx
+15
-9
No files found.
drawinglayer/inc/drawinglayer/attribute/sdrfillgraphicattribute.hxx
Dosyayı görüntüle @
b57f9217
...
...
@@ -56,6 +56,7 @@ namespace drawinglayer
/// constructors/assignmentoperator/destructor
SdrFillGraphicAttribute
(
const
Graphic
&
rFillGraphic
,
const
basegfx
::
B2DVector
&
rGraphicLogicSize
,
const
basegfx
::
B2DVector
&
rSize
,
const
basegfx
::
B2DVector
&
rOffset
,
const
basegfx
::
B2DVector
&
rOffsetPosition
,
...
...
@@ -76,6 +77,7 @@ namespace drawinglayer
// data read access
const
Graphic
&
getFillGraphic
()
const
;
const
basegfx
::
B2DVector
&
getGraphicLogicSize
()
const
;
const
basegfx
::
B2DVector
&
getSize
()
const
;
const
basegfx
::
B2DVector
&
getOffset
()
const
;
const
basegfx
::
B2DVector
&
getOffsetPosition
()
const
;
...
...
drawinglayer/source/attribute/sdrfillgraphicattribute.cxx
Dosyayı görüntüle @
b57f9217
...
...
@@ -42,6 +42,7 @@ namespace drawinglayer
// data definitions
Graphic
maFillGraphic
;
basegfx
::
B2DVector
maGraphicLogicSize
;
basegfx
::
B2DVector
maSize
;
basegfx
::
B2DVector
maOffset
;
basegfx
::
B2DVector
maOffsetPosition
;
...
...
@@ -54,6 +55,7 @@ namespace drawinglayer
ImpSdrFillGraphicAttribute
(
const
Graphic
&
rFillGraphic
,
const
basegfx
::
B2DVector
&
rGraphicLogicSize
,
const
basegfx
::
B2DVector
&
rSize
,
const
basegfx
::
B2DVector
&
rOffset
,
const
basegfx
::
B2DVector
&
rOffsetPosition
,
...
...
@@ -63,6 +65,7 @@ namespace drawinglayer
bool
bLogSize
)
:
mnRefCount
(
0
),
maFillGraphic
(
rFillGraphic
),
maGraphicLogicSize
(
rGraphicLogicSize
),
maSize
(
rSize
),
maOffset
(
rOffset
),
maOffsetPosition
(
rOffsetPosition
),
...
...
@@ -75,6 +78,7 @@ namespace drawinglayer
// data read access
const
Graphic
&
getFillGraphic
()
const
{
return
maFillGraphic
;
}
const
basegfx
::
B2DVector
&
getGraphicLogicSize
()
const
{
return
maGraphicLogicSize
;
}
const
basegfx
::
B2DVector
&
getSize
()
const
{
return
maSize
;
}
const
basegfx
::
B2DVector
&
getOffset
()
const
{
return
maOffset
;
}
const
basegfx
::
B2DVector
&
getOffsetPosition
()
const
{
return
maOffsetPosition
;
}
...
...
@@ -86,6 +90,7 @@ namespace drawinglayer
bool
operator
==
(
const
ImpSdrFillGraphicAttribute
&
rCandidate
)
const
{
return
(
getFillGraphic
()
==
rCandidate
.
getFillGraphic
()
&&
getGraphicLogicSize
()
==
rCandidate
.
getGraphicLogicSize
()
&&
getSize
()
==
rCandidate
.
getSize
()
&&
getOffset
()
==
rCandidate
.
getOffset
()
&&
getOffsetPosition
()
==
rCandidate
.
getOffsetPosition
()
...
...
@@ -107,6 +112,7 @@ namespace drawinglayer
basegfx
::
B2DVector
(),
basegfx
::
B2DVector
(),
basegfx
::
B2DVector
(),
basegfx
::
B2DVector
(),
false
,
false
,
false
);
...
...
@@ -121,6 +127,7 @@ namespace drawinglayer
SdrFillGraphicAttribute
::
SdrFillGraphicAttribute
(
const
Graphic
&
rFillGraphic
,
const
basegfx
::
B2DVector
&
rGraphicLogicSize
,
const
basegfx
::
B2DVector
&
rSize
,
const
basegfx
::
B2DVector
&
rOffset
,
const
basegfx
::
B2DVector
&
rOffsetPosition
,
...
...
@@ -131,6 +138,7 @@ namespace drawinglayer
:
mpSdrFillGraphicAttribute
(
new
ImpSdrFillGraphicAttribute
(
rFillGraphic
,
rGraphicLogicSize
,
rSize
,
rOffset
,
rOffsetPosition
,
...
...
@@ -210,6 +218,11 @@ namespace drawinglayer
return
mpSdrFillGraphicAttribute
->
getFillGraphic
();
}
const
basegfx
::
B2DVector
&
SdrFillGraphicAttribute
::
getGraphicLogicSize
()
const
{
return
mpSdrFillGraphicAttribute
->
getGraphicLogicSize
();
}
const
basegfx
::
B2DVector
&
SdrFillGraphicAttribute
::
getSize
()
const
{
return
mpSdrFillGraphicAttribute
->
getSize
();
...
...
@@ -249,7 +262,6 @@ namespace drawinglayer
{
// get logical size of bitmap (before expanding eventually)
Graphic
aGraphic
(
getFillGraphic
());
const
basegfx
::
B2DVector
aLogicalSize
(
aGraphic
.
GetPrefSize
().
getWidth
(),
aGraphic
.
GetPrefSize
().
getHeight
());
// init values with defaults
basegfx
::
B2DPoint
aBitmapSize
(
1.0
,
1.0
);
...
...
@@ -277,7 +289,9 @@ namespace drawinglayer
}
else
{
aBitmapSize
.
setX
(
aLogicalSize
.
getX
());
// #124002# use GraphicLogicSize directly, do not try to use GetPrefSize
// of the graphic, that may not be adapted to the MapMode of the target
aBitmapSize
.
setX
(
getGraphicLogicSize
().
getX
());
}
if
(
0.0
!=
getSize
().
getY
())
...
...
@@ -293,7 +307,9 @@ namespace drawinglayer
}
else
{
aBitmapSize
.
setY
(
aLogicalSize
.
getY
());
// #124002# use GraphicLogicSize directly, do not try to use GetPrefSize
// of the graphic, that may not be adapted to the MapMode of the target
aBitmapSize
.
setY
(
getGraphicLogicSize
().
getY
());
}
// get values, force to centered if necessary
...
...
svx/source/sdr/primitive2d/sdrattributecreator.cxx
Dosyayı görüntüle @
b57f9217
...
...
@@ -647,26 +647,31 @@ namespace drawinglayer
// convert size and MapMode to destination logical size and MapMode
const
MapUnit
aDestinationMapUnit
((
MapUnit
)
rSet
.
GetPool
()
->
GetMetric
(
0
));
basegfx
::
B2DVector
aGraphicLogicSize
(
aGraphic
.
GetPrefSize
().
Width
(),
aGraphic
.
GetPrefSize
().
Height
());
if
(
aGraphic
.
GetPrefMapMode
()
!=
aDestinationMapUnit
)
{
// #i100360# for MAP_PIXEL, LogicToLogic will not work properly,
// so fallback to Application::GetDefaultDevice()
Size
aNewSize
(
0
,
0
);
if
(
MAP_PIXEL
==
aGraphic
.
GetPrefMapMode
().
GetMapUnit
())
{
aGraphic
.
SetPrefSize
(
Application
::
GetDefaultDevice
()
->
PixelToLogic
(
aGraphic
.
GetPrefSize
(),
aDestinationMapUnit
));
aNewSize
=
Application
::
GetDefaultDevice
()
->
PixelToLogic
(
aGraphic
.
GetPrefSize
(),
aDestinationMapUnit
);
}
else
{
aGraphic
.
SetPrefSize
(
OutputDevice
::
LogicToLogic
(
aGraphic
.
GetPrefSize
(),
aGraphic
.
GetPrefMapMode
(),
aDestinationMapUnit
));
aNewSize
=
OutputDevice
::
LogicToLogic
(
aGraphic
.
GetPrefSize
(),
aGraphic
.
GetPrefMapMode
(),
aDestinationMapUnit
);
}
// #124002# do not set new size using SetPrefSize at the graphic, this will lead to problems.
// Instead, adapt the GraphicLogicSize which will be used for further decompositions
aGraphicLogicSize
=
basegfx
::
B2DVector
(
aNewSize
.
Width
(),
aNewSize
.
Height
());
}
// get size
...
...
@@ -682,6 +687,7 @@ namespace drawinglayer
return
attribute
::
SdrFillGraphicAttribute
(
aGraphic
,
aGraphicLogicSize
,
aSize
,
aOffset
,
aOffsetPosition
,
...
...
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