提交 e51731b2 编写于 作者: 丁劲犇's avatar 丁劲犇 😸

Reduce warp items CPU cost .

上级 3c83a95a
...@@ -194,7 +194,7 @@ ...@@ -194,7 +194,7 @@
<translation>可见</translation> <translation>可见</translation>
</message> </message>
<message> <message>
<location filename="osm_frame_widget.cpp" line="433"/> <location filename="osm_frame_widget.cpp" line="428"/>
<source>save to image</source> <source>save to image</source>
<translation>保存到图像</translation> <translation>保存到图像</translation>
</message> </message>
......
...@@ -235,23 +235,38 @@ void qtvplugin_geomarker::cb_paintEvent( QPainter * pImage ) ...@@ -235,23 +235,38 @@ void qtvplugin_geomarker::cb_paintEvent( QPainter * pImage )
rect.width(), rect.width(),
rect.height() rect.height()
); );
//Warpping 180, -180. because longitude +180 and -180 is the same point, if (!too_many_items())
// but the map is plat, -180 and + 180 is quite different positions, we {
// should draw 3 times, to slove cross 180 drawing problems. //Warpping 180, -180. because longitude +180 and -180 is the same point,
for (int p = -1; p<=1 ;++p) // but the map is plat, -180 and + 180 is quite different positions, we
// should draw 3 times, to slove cross 180 drawing problems.
for (int p = -1; p<=1 ;++p)
{
QRectF source(
leftcenx + p * winsz,
topceny,
(rightcenx - leftcenx),
(bottomceny - topceny)
);
m_pScene->render(pImage,destin,source);
}
}
else
{ {
QRectF source( QRectF source(
leftcenx + p * winsz, leftcenx ,
topceny, topceny,
(rightcenx - leftcenx), (rightcenx - leftcenx),
(bottomceny - topceny) (bottomceny - topceny)
); );
m_pScene->render(pImage,destin,source); m_pScene->render(pImage,destin,source);
} }
//draw current tools //draw current tools
switch (m_currentTools) switch (m_currentTools)
{ {
......
...@@ -308,7 +308,7 @@ ...@@ -308,7 +308,7 @@
</message> </message>
<message> <message>
<source>Level Re-Coord %1 %%</source> <source>Level Re-Coord %1 %%</source>
<translation>正在重新计算坐标完成 %1 %%</translation> <translation type="vanished">正在重新计算坐标完成 %1 %%</translation>
</message> </message>
<message> <message>
<source>name could not be empty.</source> <source>name could not be empty.</source>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册