Esempio n. 1
0
        /// <summary>
        /// Draws an image onto the screen
        /// </summary>
        /// <param name="pimage"></param>
        /// <param name="x">X-coordinate of the top left corner</param>
        /// <param name="y">Y-coordinate of the top left corner</param>
        /// <param name="width">The width that the image will be drawn in</param>
        /// <param name="height">The height that the image will be drawn in</param>
        public static void Image(PImage pimage, float x, float y, float width, float height)
        {
            SDL_Rect destRect;

            destRect.x = (int)x;
            destRect.y = (int)y;
            destRect.w = (int)width;
            destRect.h = (int)height;
            SDL_RenderCopy(renderer, pimage.texture, IntPtr.Zero, ref destRect);
        }
Esempio n. 2
0
        public PImage LoadImage(string url)
        {
            PImage pimage = new PImage(LoadTexture(url));

            return(pimage);
        }