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

Reduce warp items CPU cost .

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