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