Esempio n. 1
0
            ////////////////////////////////////////////////////////////////////////
            //--------------------------------- REVISIONS --------------------------
            // Date       Name                 Tracking #         Description
            // ---------  -------------------  -------------      ------------------
            // 18JUN2009  James Shen                              Initial Creation
            ////////////////////////////////////////////////////////////////////////

            /**
             * Constructor.
             * @param Width
             * @param Height
             */
            public MapDirectionLayer(int width, int height)
                : base(width, height)
            {
                _routeDrawWaypointOnly = MapConfiguration.DrawRouteWaypointOnly;

                _mapDrawingTileWidth = MAP_TILE_WIDTH / MapConfiguration.MapDirectionRenderBlocks;
                _routeImage          = AbstractGraphicsFactory.CreateImage(MAP_TILE_WIDTH,
                                                                           MAP_TILE_WIDTH);
                _routeGraphics = _routeImage.GetGraphics();
                if (!_routeDrawWaypointOnly)
                {
                    _routeGraphics2D = new Graphics2D(_mapDrawingTileWidth,
                                                      _mapDrawingTileWidth);
                }

                //int[] rgb = routeImage.GetRGB();
                //transparency = rgb[0];
            }
Esempio n. 2
0
        ////////////////////////////////////////////////////////////////////////////
        //--------------------------------- REVISIONS ------------------------------
        // Date       Name                 Tracking #         Description
        // ---------  -------------------  -------------      ----------------------
        // 18JUN2009  James Shen                              Initial Creation
        ////////////////////////////////////////////////////////////////////////////

        /**
         * Set the graphics factory for the map layer.
         * @param abstractGraphicsFactory
         */
        public static void SetAbstractGraphicsFactory(AbstractGraphicsFactory
                                                      abstractGraphicsFactory)
        {
            AbstractGraphicsFactory = abstractGraphicsFactory;
        }
Esempio n. 3
0
        ////////////////////////////////////////////////////////////////////////////
        //--------------------------------- REVISIONS ------------------------------
        // Date       Name                 Tracking #         Description
        // ---------  -------------------  -------------      ----------------------
        // 18JUN2009  James Shen                              Initial Creation
        ////////////////////////////////////////////////////////////////////////////

        /**
         * Constructs a new DigitalMap with given Width and Height.
         * @param Width the Width of the map image.
         * @param Height the Height of the map image.
         */
        protected DigitalMap(int width, int height)
            : base(width, height)
        {
            _mapImage    = AbstractGraphicsFactory.CreateImage(width, height);
            _mapGraphics = _mapImage.GetGraphics();
        }