Пример #1
0
        public LPixmap GetImage()
        {
            LPixmap pixmap = new LPixmap(this);

            if (isChild)
            {
                int newX      = (int)(xOff * texWidth);
                int newY      = (int)(yOff * texHeight);
                int newWidth  = (int)((texWidth * widthRatio)) - newX;
                int newHeight = (int)((texHeight * heightRatio)) - newY;
                return(pixmap.Copy(newX, newY, newWidth, newHeight));
            }
            else
            {
                return(pixmap);
            }
        }
Пример #2
0
 public LPixmap GetImage()
 {
     LPixmap pixmap = new LPixmap(this);
     if (isChild)
     {
         int newX = (int)(xOff * texWidth);
         int newY = (int)(yOff * texHeight);
         int newWidth = (int)((texWidth * widthRatio)) - newX;
         int newHeight = (int)((texHeight * heightRatio)) - newY;
         return pixmap.Copy(newX, newY, newWidth, newHeight);
     }
     else
     {
         return pixmap;
     }
 }