コード例 #1
0
 public SpriteBitmapStream(SpriteBase sprite)
 {
     Sprite = sprite;
     IntToBytes(sprite.PixelWidth, WidthB);
     IntToBytes(sprite.PixelHeight, HeightB);
     _Length = Sprite.PixelWidth * Sprite.PixelHeight * 4 + 54;
     IntToBytes((int)Length, SizeB);
     NumPixels = sprite.PixelWidth * sprite.PixelHeight;
 }
コード例 #2
0
 public SpriteBitmapStream(SpriteBase sprite)
 {
     Sprite = sprite;
     IntToBytes(sprite.PixelWidth, WidthB);
     IntToBytes(sprite.PixelHeight, HeightB);
     _Length = Sprite.PixelWidth * Sprite.PixelHeight * 4 + 54;
     IntToBytes((int)Length, SizeB);
     NumPixels = sprite.PixelWidth * sprite.PixelHeight;
 }
コード例 #3
0
 private async void Button_Click_1(object sender, RoutedEventArgs e)
 {
     Color accentColor = ((Color)App.Current.Resources["SystemColorControlAccentColor"]);
     TestTransformedSprite = new TransformedSprite() { AppliedSprite = new Sprite() { ImageUri = new Uri("ms-appx:///Assets/Icons/BusArrow.png") }, RelativeTransformOrigin = new Point(0.5, 0.473) };
     TestSprite = new TransformedSprite() { AppliedSprite = new CompositeSprite(new Sprite() { ImageUri = new Uri("ms-appx:///Assets/Icons/BusBase.png") }, TestTransformedSprite), Transform = new ScaleTransform() { /*ScaleX = .234375 * 1 / 3, ScaleY = .234375 * 1 / 3*/ } };
     //TestSprite = new CompositeSprite(new Sprite() { ImageUri = new Uri("ms-appx:///Assets/Icons/BusBase.png") }, TestTransformedSprite);
     await TestSprite.Load();
     TestSprite.Unlock();
     SetImageRotation();
 }