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; } float oldOpacity = DXManager.Opacity; DXManager.SetOpacity(opacity); DXManager.Sprite.Draw2D(mi.Image, Point.Empty, 0, point, colour); DXManager.SetOpacity(oldOpacity); mi.CleanTime = CMain.Time + Settings.CleanDelay; }
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; } float oldOpacity = DXManager.Opacity; DXManager.SetOpacity(opacity); DXManager.Sprite.Draw2D(mi.Image, section, section.Size, point, colour); DXManager.SetOpacity(oldOpacity); mi.CleanTime = CMain.Time + Settings.CleanDelay; }
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; } float oldOpacity = DXManager.Opacity; DXManager.SetOpacity(opacity); DXManager.Sprite.Draw(mi.Image, colour.ToRawColorBGRA(), new RawRectangle(section.Left, section.Top, section.Right, section.Bottom), Vector3.Zero, new Vector3(point.X, point.Y, 0.0F)); DXManager.SetOpacity(oldOpacity); mi.CleanTime = CMain.Time + Settings.CleanDelay; }
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; } float oldOpacity = DXManager.Opacity; DXManager.SetOpacity(opacity); DXManager.Sprite.Draw(mi.Image, colour.ToRawColorBGRA(), new RawRectangle(0, 0, mi.Width, mi.Height), Vector3.Zero, new Vector3(point.X, point.Y, 0.0F)); DXManager.SetOpacity(oldOpacity); mi.CleanTime = CMain.Time + Settings.CleanDelay; }
public void Draw(int Index, Point Location, Color Colour, float Opacity = 1F, bool OffSet = false) { if (!CheckImage(Index)) { return; } if (OffSet) { Location.Offset(ImageList[Index].OffSet); } float OldOpacity = DXManager.Opacity; if (Opacity < 1F) { DXManager.SetOpacity(Opacity); } DXManager.Sprite.Draw2D(ImageList[Index].ImageTexture, Point.Empty, 0, Location, Colour.ToArgb()); if (Opacity < 1F) { DXManager.SetOpacity(OldOpacity); } }
public void Draw(int Index, Rectangle Section, Point Location, Color Colour, float Opacity = 1F, bool OffSet = false) { if (!CheckImage(Index)) { return; } if (OffSet) { Section.Offset(ImageList[Index].OffSet); } if (Section.Right > ImageList[Index].Size.Width) { Section.Width -= Section.Right - ImageList[Index].Size.Width; } if (Section.Bottom > ImageList[Index].Size.Height) { Section.Height -= Section.Bottom - ImageList[Index].Size.Height; } float OldOpacity = DXManager.Opacity; if (Opacity < 1F) { DXManager.SetOpacity(Opacity); } DXManager.Sprite.Draw2D(ImageList[Index].ImageTexture, Section, Section.Size, Location, Colour); if (Opacity < 1F) { DXManager.SetOpacity(OldOpacity); } }