当前位置: 首页 > news >正文

用dw软件做网站栅格系统广告精准推广平台

用dw软件做网站栅格系统,广告精准推广平台,手游排行榜前十名网络游戏,免费网站搭建系统前文链接:QGraphicsView实现简易地图7『异步加载-多瓦片-无底图』 前7篇的地图加载,都采用最少瓦片数量的算法,即用最少数量的瓦片覆盖视口,以获得最快的加载速度。但是这样会带来一个问题,那就是每当移动地图时&#…

前文链接:QGraphicsView实现简易地图7『异步加载-多瓦片-无底图』
前7篇的地图加载,都采用最少瓦片数量的算法,即用最少数量的瓦片覆盖视口,以获得最快的加载速度。但是这样会带来一个问题,那就是每当移动地图时,视口周边的瓦片才会加载,这样会造成地图的延时甚至卡顿,而这会令用户感到非常反感。为此,需要在之前的算法上进行改进:加载覆盖视口的最少瓦片后,立即加载视口周边瓦片;加载过的瓦片离开视口后不再删除,以加快下次进入视口后的渲染。
1、动态演示效果

2、获取视口及周边瓦片代码:以视口宽高的一半向四周扩展

QRect CommonUtility::getViewAndAroundTileCoords(int tempTileTop, int tileLeft, int tempTileBottom, int tileRight, int level, vector<TileCoord> &vecTileCoord)
{// <1> 视口for (int row = tempTileTop; row <= tempTileBottom; ++row){for (int col = tileLeft; col <= tileRight; ++col){vecTileCoord.push_back(TileCoord(col, row));}}int mapSize = pow(2, level);int tileW = tileRight - tileLeft + 1;int tileH = tempTileBottom - tempTileTop + 1;int tempTileT, tempTileL, tempTileB, tempTileR;int tileT, tileL, tileB, tileR;// <2> 上侧tileT = tempTileT = qMax(tempTileTop - tileH / 2, 0);tempTileB = tempTileTop - 1;tempTileL = qMax(tileLeft - tileW / 2, 0);	tempTileR = qMin(tileRight + tileW / 2, mapSize - 1);for (int row = tempTileT; row <= tempTileB; ++row){for (int col = tempTileL; col <= tempTileR; ++col){vecTileCoord.push_back(TileCoord(col, row));}}// <3> 下侧tempTileT = tempTileBottom + 1;tileB = tempTileB = qMin(tempTileBottom + tileH / 2, mapSize - 1);tempTileL = qMax(tileLeft - tileW / 2, 0);tempTileR = qMin(tileRight + tileW / 2, mapSize - 1);for (int row = tempTileT; row <= tempTileB; ++row){for (int col = tempTileL; col <= tempTileR; ++col){vecTileCoord.push_back(TileCoord(col, row));}}// <4> 左侧tileL = tempTileL = qMax(tileLeft - tileW / 2, 0);tempTileR = tileLeft - 1;for (int row = tempTileTop; row <= tempTileBottom; ++row){for (int col = tempTileL; col <= tempTileR; ++col){vecTileCoord.push_back(TileCoord(col, row));}}// <5> 右侧tempTileL = tileRight + 1;tileR = tempTileR = qMin(tileRight + tileW / 2, mapSize - 1);for (int row = tempTileTop; row <= tempTileBottom; ++row){for (int col = tempTileL; col <= tempTileR; ++col){vecTileCoord.push_back(TileCoord(col, row));}}return QRect(tileL, tileT, (tileR - tileL + 1), (tileB - tileT + 1));
}


http://www.hkea.cn/news/929738/

相关文章:

  • 重庆市建设信息网站关键词查询网
  • 做哪种网站流量大怎么打广告宣传自己的产品
  • 免费表白网站制作seo网络优化推广
  • 网站建设中可能升级中国科技新闻网
  • 网站制作内容文案网站如何快速被百度收录
  • 淘宝淘宝网页版登录入口免费seo公司
  • 竹溪县县建设局网站短视频营销
  • 好的网站有哪些搜索引擎seo是什么意思
  • 做音乐网站赚钱吗做小程序的公司
  • 坪地网站建设域名流量查询工具
  • 网站建设部署万能推广app
  • 网站的重要性怎么做个网站
  • 做网站的经验百度旗下有哪些app
  • 化工网站开发推广点击器
  • 怎么访问日本竹中建设网站外贸seo推广
  • 惠阳建设局网站引流推广接单
  • 北京通州网站建设公司如何建立公司网站网页
  • 网站换程序301seo优化按天扣费
  • html5 网站自适应长尾关键词挖掘爱站工具
  • 网站设计公司(信科网络)潍坊网站定制模板建站
  • 番禺网站开发报价百度竞价排名软件
  • 做企业网站接单seo网站优化技术
  • 建设网站行业云网络推广理实一体化软件
  • 如何用自己公司网站做邮箱关键字是什么意思
  • 古典网站建设欣赏马鞍山网站seo
  • 商城网站建设报价方案免费建网站软件下载
  • 中国做美国酒店的网站好竞价托管收费标准
  • 网站开发与设计静态网页源代码站长之家app下载
  • 松原做网站app运营推广是干什么
  • 做简单的网站链接2024新闻热点摘抄