示例#1
0
        public Image GetSubImage(WWUtils.Math.Rect <float> subImageSpace)
        {
            ImageImpl sub = new ImageImpl();

            sub.JSImage  = JSImage;
            sub.subimage = new Rect <float> (subimage.position.X + subImageSpace.position.X,
                                             subimage.position.Y + subImageSpace.position.Y,
                                             subImageSpace.size.X, subImageSpace.size.Y);
            sub.Loaded = true;
            return(sub);
        }
示例#2
0
        public void DrawImage(Image image, WWUtils.Math.Rect <float> destinationRect, WWUtils.Math.Vector2 <float> Handle, float rotation)
        {
            mgr.PushState();
            mgr.Translate((int)-Handle.X, (int)-Handle.Y);
            mgr.Rotate(rotation);
            ImageImpl img = image as ImageImpl;

            mgr.DrawImage(img.JSImage, (int)img.subimage.position.X, (int)img.subimage.position.Y,
                          (int)Math.Round(img.subimage.size.X), (int)Math.Round(img.subimage.size.Y),
                          (int)destinationRect.position.X, (int)destinationRect.position.Y,
                          (int)Math.Round(destinationRect.size.X), (int)Math.Round(destinationRect.size.Y));
            mgr.PopState();
        }
示例#3
0
 public void DrawImage(Image image, WWUtils.Math.Rect <float> destinationRect)
 {
     DrawImage(image, destinationRect, new Vector2 <float> (0, 0), 0f);
 }