Exemple #1
0
        public void Draw(int index, Rectangle section, Point point, Color colour, float opacity)
        {
            if (!CheckImage(index))
            {
                return;
            }

            MImage mi = _images[index];


            if (point.X >= Settings.ScreenWidth || point.Y >= Settings.ScreenHeight || point.X + mi.Width < 0 || point.Y + mi.Height < 0)
            {
                return;
            }

            if (section.Right > mi.Width)
            {
                section.Width -= section.Right - mi.Width;
            }

            if (section.Bottom > mi.Height)
            {
                section.Height -= section.Bottom - mi.Height;
            }

            DXManager.DrawOpaque(mi.Image, section, new Vector3((float)point.X, (float)point.Y, 0.0F), colour, opacity);

            mi.CleanTime = CMain.Time + Settings.CleanDelay;
        }
Exemple #2
0
        public void Draw(int index, Point point, Color colour, bool offSet, float opacity)
        {
            if (!CheckImage(index))
            {
                return;
            }

            MImage mi = _images[index];

            if (offSet)
            {
                point.Offset(mi.X, mi.Y);
            }

            if (point.X >= Settings.ScreenWidth || point.Y >= Settings.ScreenHeight || point.X + mi.Width < 0 || point.Y + mi.Height < 0)
            {
                return;
            }

            DXManager.DrawOpaque(mi.Image, new Rectangle(0, 0, mi.Width, mi.Height), new Vector3((float)point.X, (float)point.Y, 0.0F), colour, opacity);

            mi.CleanTime = CMain.Time + Settings.CleanDelay;
        }