ShapePolygon.DesignExt.cs 999 B

12345678910111213141516171819202122232425262728293031
  1. using FastReport.Utils;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Drawing;
  5. using System.Drawing.Drawing2D;
  6. using System.Text;
  7. namespace FastReport.Map
  8. {
  9. partial class ShapePolygon
  10. {
  11. private void DrawDesign(FRPaintEventArgs e, ref Brush brush, ref bool disposeBrush)
  12. {
  13. // display the selection in the designer
  14. Report report = Map.Report;
  15. if (report != null && report.IsDesigning && report.Designer != null &&
  16. report.Designer.SelectedObjects != null)
  17. {
  18. if (report.Designer.SelectedObjects.Contains(this))
  19. brush = e.Cache.GetBrush(Color.Orange);
  20. }
  21. // display the selection in the preview
  22. if (Map.HotPoint == this)
  23. {
  24. brush = new HatchBrush(HatchStyle.BackwardDiagonal, Color.White, (brush as SolidBrush).Color);
  25. disposeBrush = true;
  26. }
  27. }
  28. }
  29. }