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
1163d6ad
Kaydet (Commit)
1163d6ad
authored
Ock 13, 2014
tarafından
Markus Mohrhard
Kaydeden (comit)
Markus Mohrhard
Ock 29, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
no need for a member variable if only used in one method
Change-Id: If82cb7ff43932c6d37d4b3100c2bd5228f6109ce
üst
55add3e2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
25 deletions
+24
-25
OpenGLRender.cxx
chart2/source/view/main/OpenGLRender.cxx
+24
-24
OpenGLRender.hxx
chart2/source/view/main/OpenGLRender.hxx
+0
-1
No files found.
chart2/source/view/main/OpenGLRender.cxx
Dosyayı görüntüle @
1163d6ad
...
...
@@ -932,7 +932,6 @@ OpenGLRender::OpenGLRender(uno::Reference< drawing::XShape > xTarget):
{
//TODO: moggi: use STL
memset
(
&
m_Bubble2DCircle
,
0
,
sizeof
(
m_Bubble2DCircle
));
memset
(
&
m_TextInfo
,
0
,
sizeof
(
TextInfo
));
m_iArbMultisampleFormat
=
0
;
...
...
@@ -1504,44 +1503,45 @@ int OpenGLRender::CreateTextTexture(::rtl::OUString textValue, sal_uInt32 color,
}
}
aBitmap
.
ReleaseAccess
(
pRAcc
);
m_TextInfo
.
x
=
(
float
)(
aPos
.
X
+
aSize
.
Width
/
2
)
/
OPENGL_SCALE_VALUE
;
m_TextInfo
.
y
=
(
float
)(
aPos
.
Y
+
aSize
.
Height
/
2
)
/
OPENGL_SCALE_VALUE
;
m_TextInfo
.
z
=
m_fZStep
;
m_TextInfo
.
rotation
=
-
(
double
)
rotation
*
GL_PI
/
18000.0
f
;
m_TextInfo
.
vertex
[
0
]
=
(
float
)(
-
aSize
.
Width
/
2
)
/
OPENGL_SCALE_VALUE
;
m_TextInfo
.
vertex
[
1
]
=
(
float
)(
-
aSize
.
Height
/
2
)
/
OPENGL_SCALE_VALUE
;
TextInfo
aTextInfo
;
aTextInfo
.
x
=
(
float
)(
aPos
.
X
+
aSize
.
Width
/
2
)
/
OPENGL_SCALE_VALUE
;
aTextInfo
.
y
=
(
float
)(
aPos
.
Y
+
aSize
.
Height
/
2
)
/
OPENGL_SCALE_VALUE
;
aTextInfo
.
z
=
m_fZStep
;
aTextInfo
.
rotation
=
-
(
double
)
rotation
*
GL_PI
/
18000.0
f
;
aTextInfo
.
vertex
[
0
]
=
(
float
)(
-
aSize
.
Width
/
2
)
/
OPENGL_SCALE_VALUE
;
aTextInfo
.
vertex
[
1
]
=
(
float
)(
-
aSize
.
Height
/
2
)
/
OPENGL_SCALE_VALUE
;
m_
TextInfo
.
vertex
[
2
]
=
(
float
)(
aSize
.
Width
/
2
)
/
OPENGL_SCALE_VALUE
;
m_
TextInfo
.
vertex
[
3
]
=
(
float
)(
-
aSize
.
Height
/
2
)
/
OPENGL_SCALE_VALUE
;
a
TextInfo
.
vertex
[
2
]
=
(
float
)(
aSize
.
Width
/
2
)
/
OPENGL_SCALE_VALUE
;
a
TextInfo
.
vertex
[
3
]
=
(
float
)(
-
aSize
.
Height
/
2
)
/
OPENGL_SCALE_VALUE
;
m_
TextInfo
.
vertex
[
4
]
=
(
float
)(
aSize
.
Width
/
2
)
/
OPENGL_SCALE_VALUE
;
m_
TextInfo
.
vertex
[
5
]
=
(
float
)(
aSize
.
Height
/
2
)
/
OPENGL_SCALE_VALUE
;
a
TextInfo
.
vertex
[
4
]
=
(
float
)(
aSize
.
Width
/
2
)
/
OPENGL_SCALE_VALUE
;
a
TextInfo
.
vertex
[
5
]
=
(
float
)(
aSize
.
Height
/
2
)
/
OPENGL_SCALE_VALUE
;
m_
TextInfo
.
vertex
[
6
]
=
(
float
)(
-
aSize
.
Width
/
2
)
/
OPENGL_SCALE_VALUE
;
m_
TextInfo
.
vertex
[
7
]
=
(
float
)(
aSize
.
Height
/
2
)
/
OPENGL_SCALE_VALUE
;
a
TextInfo
.
vertex
[
6
]
=
(
float
)(
-
aSize
.
Width
/
2
)
/
OPENGL_SCALE_VALUE
;
a
TextInfo
.
vertex
[
7
]
=
(
float
)(
aSize
.
Height
/
2
)
/
OPENGL_SCALE_VALUE
;
//if has ratotion, we must re caculate the central pos
if
(
!
rtl
::
math
::
approxEqual
(
0
,
rotation
))
{
//use left top
double
r
=
sqrt
((
double
)(
aSize
.
Width
*
aSize
.
Width
+
aSize
.
Height
*
aSize
.
Height
))
/
2
;
double
sinOrgAngle
=
m_
TextInfo
.
vertex
[
1
]
/
r
/
2
;
double
cosOrgAngle
=
m_
TextInfo
.
vertex
[
0
]
/
r
/
2
;
double
sinDiataAngle
=
sin
(
m_
TextInfo
.
rotation
);
double
cosDiataAngle
=
cos
(
m_
TextInfo
.
rotation
);
double
sinOrgAngle
=
a
TextInfo
.
vertex
[
1
]
/
r
/
2
;
double
cosOrgAngle
=
a
TextInfo
.
vertex
[
0
]
/
r
/
2
;
double
sinDiataAngle
=
sin
(
a
TextInfo
.
rotation
);
double
cosDiataAngle
=
cos
(
a
TextInfo
.
rotation
);
double
x
=
r
*
(
cosOrgAngle
*
cosDiataAngle
-
sinOrgAngle
*
sinDiataAngle
);
double
y
=
r
*
(
sinOrgAngle
*
cosDiataAngle
+
cosOrgAngle
*
sinDiataAngle
);
double
diataX
=
x
-
m_
TextInfo
.
vertex
[
0
];
double
diataY
=
y
-
m_
TextInfo
.
vertex
[
1
];
m_TextInfo
.
x
=
m_
TextInfo
.
x
-
diataX
;
m_TextInfo
.
y
=
m_
TextInfo
.
y
-
diataY
;
double
diataX
=
x
-
a
TextInfo
.
vertex
[
0
];
double
diataY
=
y
-
a
TextInfo
.
vertex
[
1
];
aTextInfo
.
x
=
a
TextInfo
.
x
-
diataX
;
aTextInfo
.
y
=
a
TextInfo
.
y
-
diataY
;
}
CHECK_GL_ERROR
();
glGenTextures
(
1
,
&
m_
TextInfo
.
texture
);
glGenTextures
(
1
,
&
a
TextInfo
.
texture
);
CHECK_GL_ERROR
();
glBindTexture
(
GL_TEXTURE_2D
,
m_
TextInfo
.
texture
);
glBindTexture
(
GL_TEXTURE_2D
,
a
TextInfo
.
texture
);
CHECK_GL_ERROR
();
glTexParameteri
(
GL_TEXTURE_2D
,
GL_TEXTURE_WRAP_S
,
GL_CLAMP
);
CHECK_GL_ERROR
();
...
...
@@ -1555,7 +1555,7 @@ int OpenGLRender::CreateTextTexture(::rtl::OUString textValue, sal_uInt32 color,
CHECK_GL_ERROR
();
glBindTexture
(
GL_TEXTURE_2D
,
0
);
CHECK_GL_ERROR
();
m_TextInfoList
.
push_back
(
m_
TextInfo
);
m_TextInfoList
.
push_back
(
a
TextInfo
);
return
0
;
}
...
...
chart2/source/view/main/OpenGLRender.hxx
Dosyayı görüntüle @
1163d6ad
...
...
@@ -277,7 +277,6 @@ private:
std
::
list
<
RectanglePointList
>
m_RectangleShapePointList
;
// add for text
TextInfo
m_TextInfo
;
std
::
list
<
TextInfo
>
m_TextInfoList
;
GLint
m_TextProID
;
GLint
m_TextMatrixID
;
...
...
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