• Delphi ArcEngine 闪烁显示指定点附近元素方法


    function FlashElement(aeMapControl: TMapControl; iFlashCount, iInternal: Integer;
      pColor: IColor; pPoint: IPoint): Boolean;
    var
      pEnumElement: IEnumElement;
      pElement: IElement;
      pGraphicsContainer: IGraphicsContainer;
      pMarkerSymbol: ISimpleMarkerSymbol;
      pLineSymbol: ISimpleLineSymbol;
      pFillSymbol: ISimpleFillSymbol;
      pSymbol: ISymbol;
    begin
      pGraphicsContainer := aeMapControl.Map as IGraphicsContainer;

      pEnumElement := pGraphicsContainer.LocateElements(pPoint, 10);

      if pEnumElement = nil then
        Exit(False);

      pElement := pEnumElement.Next;
      while pElement <> nil do
      begin

        case pElement.Geometry.GeometryType of
          esriGeometryPoint, esriGeometryMultipoint:
            begin
              pMarkerSymbol := CoSimpleMarkerSymbol.Create as ISimpleMarkerSymbol;
              pMarkerSymbol.Color := pColor;
              pMarkerSymbol.Style := esriSMSCircle;

              pSymbol := pMarkerSymbol as ISymbol;
            end;

          esriGeometryLine, esriGeometryPolyline:
            begin
              pLineSymbol := CoSimpleLineSymbol.Create as ISimpleLineSymbol;
              pLineSymbol.Color := pColor;
              pLineSymbol.Style := esriSLSSolid;
              pSymbol := pLineSymbol as ISymbol;
            end;

          esriGeometryPolygon:
            begin
              pFillSymbol := CoSimpleFillSymbol.Create as ISimpleFillSymbol;
              pFillSymbol.Color := pColor;
              pFillSymbol.Style := esriSFSSolid;
              pSymbol := pFillSymbol as ISymbol;
            end;
        end;
        aeMapControl.FlashShape(pElement.Geometry, iFlashCount, iInternal, pSymbol);
        pElement := pEnumElement.Next;
      end;
      Result := True;
    end;
  • 相关阅读:
    分频
    加法器
    The best season is around you
    电影词汇
    DSP芯片和所有微处理器一样,以2的补码形式表示有符号数。
    乔布斯给妻子的结婚20周年情书
    webapp 处理表单
    看过戴旭之《中国面临被肢解的命运》之后
    转我在敏捷中国Open Space上发起的讨论主题——如何激励,用绩效考核吗?
    转QA不是QC,兼谈Lean、Kanban和TDD(上)
  • 原文地址:https://www.cnblogs.com/chinacodegear/p/1425456.html
Copyright © 2020-2023  润新知