Example #1
0
        public static unsafe Texture LoadTexture(Renderer renderer, RWOps src, string?type = null)
        {
            if (type == null)
            {
                return(ErrorIfInvalid(IMG_LoadTexture_RW(renderer, src, 0)));
            }
            else
            {
                Span <byte> buf = stackalloc byte[SL(type)];
                StringToUTF8(type, buf);

                fixed(byte *b = buf)
                return(ErrorIfInvalid(IMG_LoadTextureTyped_RW(renderer, src, 0, b)));
            }
        }
Example #2
0
        public static unsafe Surface Load(RWOps src, string?type = null)
        {
            if (type == null)
            {
                return(ErrorIfInvalid(IMG_Load_RW(src, 0)));
            }
            else
            {
                Span <byte> buf = stackalloc byte[SL(type)];
                StringToUTF8(type, buf);

                fixed(byte *b = buf)
                return(ErrorIfInvalid(IMG_LoadTyped_RW(src, 0, b)));
            }
        }
Example #3
0
 public static Surface LoadWEBP(RWOps ops)
 => ErrorIfInvalid(IMG_LoadWEBP_RW(ops));
Example #4
0
 public static extern int IMG_isWEBP(RWOps src);
Example #5
0
 public static extern int IMG_isTIF(RWOps src);
Example #6
0
 public static extern int IMG_isPNM(RWOps src);
Example #7
0
 public static extern int IMG_isCUR(RWOps src);
Example #8
0
 public static extern Texture IMG_LoadTextureTyped_RW(Renderer renderer, RWOps src, int freesrc, /*const char*/ byte *type);
Example #9
0
 public static extern Surface IMG_Load_RW(RWOps src, int freesrc);
Example #10
0
 public static bool IsBMP(RWOps ops)
 => IMG_isBMP(ops) == 1;
Example #11
0
 public static bool IsCUR(RWOps ops)
 => IMG_isCUR(ops) == 1;
Example #12
0
 public static bool IsICO(RWOps ops)
 => IMG_isICO(ops) == 1;
Example #13
0
 public static void SaveJPG(Surface surface, RWOps dst, int quality)
 {
     ErrorIfNegative(IMG_SaveJPG_RW(surface, dst, 0, quality));
 }
Example #14
0
 public static void SavePNG(Surface surface, RWOps dst)
 {
     ErrorIfNegative(IMG_SavePNG_RW(surface, dst, 0));
 }
Example #15
0
 public static extern int IMG_SaveJPG_RW(Surface surface, RWOps dst, int freedst, int quality);
Example #16
0
 public static bool IsGIF(RWOps ops)
 => IMG_isGIF(ops) == 1;
Example #17
0
 public static extern Surface IMG_LoadTyped_RW(RWOps src, int freesrc, /*const char*/ byte *type);
Example #18
0
 public static bool IsJPG(RWOps ops)
 => IMG_isJPG(ops) == 1;
Example #19
0
 public static extern Texture IMG_LoadTexture_RW(Renderer renderer, RWOps src, int freesrc);
Example #20
0
 public static bool IsLBM(RWOps ops)
 => IMG_isLBM(ops) == 1;
Example #21
0
 public static extern int IMG_isICO(RWOps src);
Example #22
0
 public static bool IsPCX(RWOps ops)
 => IMG_isPCX(ops) == 1;
Example #23
0
 public static extern int IMG_isBMP(RWOps src);
Example #24
0
 public static bool IsPNM(RWOps ops)
 => IMG_isPNM(ops) == 1;
Example #25
0
 public static extern int IMG_isSVG(RWOps src);
Example #26
0
 public static extern Surface IMG_LoadWEBP_RW(RWOps src);
Example #27
0
 public static extern int IMG_isXV(RWOps src);
Example #28
0
 public static extern int IMG_SavePNG_RW(Surface surface, RWOps dst, int freedst);
Example #29
0
 public static extern Surface IMG_LoadLBM_RW(RWOps src);
Example #30
0
 public static Surface LoadXPM(RWOps ops)
 => ErrorIfInvalid(IMG_LoadXPM_RW(ops));