Ejemplo n.º 1
0
        private static void DrawPointWithSymbolStyle(SymbolStyle symbolStyle, Point destination, IDictionary <int, TextureInfo> bitmapCache)
        {
            TextureInfo textureInfo;

            if (!bitmapCache.Keys.Contains(symbolStyle.BitmapId))
            {
                textureInfo = TextureHelper.LoadTexture(BitmapRegistry.Instance.Get(symbolStyle.BitmapId));
                bitmapCache[symbolStyle.BitmapId] = textureInfo;
            }
            else
            {
                textureInfo = bitmapCache[symbolStyle.BitmapId];
            }

            TextureHelper.RenderTexture(textureInfo, (float)destination.X, (float)destination.Y,
                                        (float)symbolStyle.SymbolRotation,
                                        (float)symbolStyle.SymbolOffset.X, (float)symbolStyle.SymbolOffset.Y,
                                        opacity: (float)symbolStyle.Opacity, scale: (float)symbolStyle.SymbolScale);
        }