예제 #1
0
        private static void GetBoundsInternal(IntPtr d, void *context, SKRect *rect)
        {
            var drawable = DelegateProxies.GetUserData <SKDrawable> ((IntPtr)context, out _);
            var bounds   = drawable.OnGetBounds();

            *rect = bounds;
        }
예제 #2
0
        private void DrawAtlas(SKImage atlas, SKRect[] sprites, SKRotationScaleMatrix[] transforms, SKColor[] colors, SKBlendMode mode, SKRect *cullRect, SKPaint paint)
        {
            if (atlas == null)
            {
                throw new ArgumentNullException(nameof(atlas));
            }
            if (sprites == null)
            {
                throw new ArgumentNullException(nameof(sprites));
            }
            if (transforms == null)
            {
                throw new ArgumentNullException(nameof(transforms));
            }

            if (transforms.Length != sprites.Length)
                throw new ArgumentException("The number of transforms must match the number of sprites.", nameof(transforms)); }
예제 #3
0
 private void DrawAtlas(SKImage atlas, SKRect[] sprites, SKRotationScaleMatrix[] transforms, SKColor[] colors, SKBlendMode mode, SKRect *cullRect, SKPaint paint)
 {
     if (atlas == null)
     {
         throw new ArgumentNullException(nameof(atlas));
     }
     if (sprites == null)
     {
         throw new ArgumentNullException(nameof(sprites));
     }
     if (transforms == null)
         throw new ArgumentNullException(nameof(transforms)); }