예제 #1
0
        public ImageSection GetSection(int index)
        {
            ImageSection result = null;

            if (index >= 0 && index < fSections.Count)
            {
                result = fSections[index];
            }
            return(result);
        }
예제 #2
0
 public void DrawSection(BaseScreen screen, int aX, int aY, int index, int opacity)
 {
     if (index >= 0 && index < fSections.Count)
     {
         ImageSection sec = fSections[index];
         if (sec.ImageIndex >= 0 && sec.ImageIndex < fImages.Count)
         {
             BaseImage img = fImages[sec.ImageIndex];
             screen.DrawImage(aX, aY, sec.Left, sec.Top, sec.Width, sec.Height, img, opacity);
         }
     }
 }
예제 #3
0
        private int AddSection(int imageIndex, int aX, int aY, int aWidth, int aHeight)
        {
            ImageSection sect = new ImageSection();

            sect.ImageIndex = imageIndex;
            sect.Left       = aX;
            sect.Top        = aY;
            sect.Height     = aHeight;
            sect.Width      = aWidth;

            int result = fSections.Count;

            fSections.Add(sect);
            return(result);
        }