zoukankan      html  css  js  c++  java
  • mapx使用经验(C#版)(未完成...)


    一。可以动态生成Map
    1AxMapXLib.AxMap map = new AxMapXLib.AxMap();
    2map.Layers.RemoveAll();
    3map.Parent = this;
    4map.Layers.Add(strFileName);


    必须设置map.Parent = this;

    否则不能显示。

    二。很多组件使用标准动态链接库处理字体,颜色。
    程序集为stdole.dll

    stdole中使用BGR表示颜色。
    而组件mapx,maplbjects很多地方使用RGB表示颜色
    dotnet使用Argb表示颜色。

     1using stdole;
     2uint ArgbToBgr(System.Drawing.Color argb)
     3{
     4uint r = argb.R;
     5uint g = argb.G;
     6uint b = argb.B;
     7uint color = r|(g<<8)|(b<<16);
     8return color;
     9}

    10
    11uint RgbToBgr(uint rgb)
    12{
    13uint r = (rgb>>16)|0xFF;
    14uint g = (rgb>>8)|0xFF;
    15uint b = rgb|0xFF;
    16uint color = r|(g<<8)|(b<<16);
    17return color;
    18}

    19uint BgrToRgb(uint bgr)
    20{
    21return RgbToBgr(bgr);
    22}

    23


    还有在mapx和mapobjects 中都用stdole.IFont 表示字体。
  • 相关阅读:
    高可用keepalived的抢占式与非抢占式
    keepalived搭建
    高可用概念
    Nginx优雅显示错误页面
    Nginx调整上传文件大小
    nginx的root和alias区别
    nginx的include
    每日总结2.18
    每日总结2.17
    每日总结2.16
  • 原文地址:https://www.cnblogs.com/xiexiaokui/p/159725.html
Copyright © 2011-2022 走看看