示例#1
0
        public void Draw(Surface dst, int tX, int tY, IPixelOp pixelOp)
        {
            if (this.disposed)
            {
                throw new ObjectDisposedException("IrregularSurface");
            }

            foreach (PlacedSurface ps in this.placedSurfaces)
            {
                ps.Draw(dst, tX, tY, pixelOp);
            }
        }
示例#2
0
        public void Draw(Surface dst, IPixelOp pixelOp)
        {
            if (disposed)
            {
                throw new ObjectDisposedException("PlacedSurface");
            }

            Rectangle dstRect = Bounds;
            Rectangle dstClip = Rectangle.Intersect(dstRect, dst.Bounds);

            if (dstClip.Width > 0 && dstClip.Height > 0)
            {
                int dtX = dstClip.X - where.X;
                int dtY = dstClip.Y - where.Y;

                pixelOp.Apply(dst, dstClip.Location, what, new Point(dtX, dtY), dstClip.Size);
            }
        }
示例#3
0
        public void Draw(Surface dst, int tX, int tY, IPixelOp pixelOp)
        {
            if (disposed)
            {
                throw new ObjectDisposedException("PlacedSurface");
            }

            Point oldWhere = where;

            try
            {
                where.X += tX;
                where.Y += tY;
                Draw(dst, pixelOp);
            }

            finally
            {
                where = oldWhere;
            }
        }
示例#4
0
        public void Draw(Surface dst, int tX, int tY, IPixelOp pixelOp)
        {
            if (this.disposed)
            {
                throw new ObjectDisposedException("IrregularSurface");
            }

            foreach (PlacedSurface ps in this.placedSurfaces)
            {
                ps.Draw(dst, tX, tY, pixelOp);
            }
        }
示例#5
0
        public void Draw(Surface dst, IPixelOp pixelOp)
        {
            if (disposed)
            {
                throw new ObjectDisposedException("PlacedSurface");
            }

            Rectangle dstRect = Bounds;
            Rectangle dstClip = Rectangle.Intersect(dstRect, dst.Bounds);

            if (dstClip.Width > 0 && dstClip.Height > 0)
            {
                int dtX = dstClip.X - where.X;
                int dtY = dstClip.Y - where.Y;

                pixelOp.Apply(dst, dstClip.Location, what, new Point(dtX, dtY), dstClip.Size);
            }
        }
示例#6
0
        public void Draw(Surface dst, int tX, int tY, IPixelOp pixelOp)
        {
            if (disposed)
            {
                throw new ObjectDisposedException("PlacedSurface");
            }

            Point oldWhere = where;

            try
            {
                where.X += tX;
                where.Y += tY;
                Draw(dst, pixelOp);
            }

            finally
            {
                where = oldWhere;
            }
        }