private Texture PageMaskTexture(PageCoord pc)
        {
            Image i = BuildPageMask(pc.WorldLocation(pageSize));

            String  texName = String.Format("{0}-{1}", name, pc.ToString());
            Texture t       = TextureManager.Instance.LoadImage(texName, i);

            return(t);
        }
Пример #2
0
        private void SetRoadMask(TerrainPage terrainPage)
        {
            // generate a texture from the mask
            PageCoord pc = new PageCoord(terrainPage.Location, TerrainManager.Instance.PageSize);

            byte[] byteMask = mask.GetMask(pc);
            if (byteMask != null)
            {
                Image   maskImage = Image.FromDynamicImage(byteMask, mask.PageSize, mask.PageSize, PixelFormat.A8);
                String  texName   = String.Format("RoadMask-{0}", pc.ToString());
                Texture texImage  = TextureManager.Instance.LoadImage(texName, maskImage);

                terrainPage.HilightMask = texImage;
                terrainPage.HilightType = TerrainPage.PageHilightType.EdgeSharpBlend;
            }
        }
Пример #3
0
        private Texture PageMaskTexture(PageCoord pc)
        {
            Image i = BuildPageMask(pc.WorldLocation(pageSize));

            String texName = String.Format("{0}-{1}", name, pc.ToString());
            Texture t = TextureManager.Instance.LoadImage(texName, i);

            return t;
        }
Пример #4
0
        private void SetRoadMask(TerrainPage terrainPage)
        {
            // generate a texture from the mask
            PageCoord pc = new PageCoord(terrainPage.Location, TerrainManager.Instance.PageSize);

            byte[] byteMask = mask.GetMask(pc);
            if (byteMask != null)
            {

                Image maskImage = Image.FromDynamicImage(byteMask, mask.PageSize, mask.PageSize, PixelFormat.A8);
                String texName = String.Format("RoadMask-{0}", pc.ToString());
                Texture texImage = TextureManager.Instance.LoadImage(texName, maskImage);

                terrainPage.HilightMask = texImage;
                terrainPage.HilightType = TerrainPage.PageHilightType.EdgeSharpBlend;
            }
        }