1 | using System;
|
---|
2 | using System.Drawing;
|
---|
3 | namespace Netron.Diagramming.Core
|
---|
4 | {
|
---|
5 | /// <summary>
|
---|
6 | /// The interface of shape material.
|
---|
7 | /// </summary>
|
---|
8 | public interface IShapeMaterial:
|
---|
9 | IPaintable,
|
---|
10 | IServiceProvider,
|
---|
11 | IVersion
|
---|
12 | {
|
---|
13 |
|
---|
14 | /// <summary>
|
---|
15 | /// Gets or sets a value indicating whether this <see cref="T:IShapeMaterial"/> is resizable.
|
---|
16 | /// </summary>
|
---|
17 | /// <value><c>true</c> if resizable; otherwise, <c>false</c>.</value>
|
---|
18 | bool Resizable { get; set; }
|
---|
19 |
|
---|
20 | /// <summary>
|
---|
21 | /// Gets or sets a value indicating whether the material should remain a fixed position with respect to the shape or should
|
---|
22 | /// glide proportionally wih the scaling.
|
---|
23 | /// </summary>
|
---|
24 | /// <value><c>true</c> if [no gliding]; otherwise, <c>false</c>.</value>
|
---|
25 | bool Gliding { get; set;}
|
---|
26 | /// <summary>
|
---|
27 | /// Gets or sets the shape to which this material belongs.
|
---|
28 | /// </summary>
|
---|
29 | /// <value>The shape.</value>
|
---|
30 | IShape Shape { get; set;}
|
---|
31 |
|
---|
32 | // ------------------------------------------------------------------
|
---|
33 | /// <summary>
|
---|
34 | /// Gets or sets the text style.
|
---|
35 | /// </summary>
|
---|
36 | // ------------------------------------------------------------------
|
---|
37 | ITextStyle TextStyle
|
---|
38 | {
|
---|
39 | get;
|
---|
40 | set;
|
---|
41 | }
|
---|
42 |
|
---|
43 | /// <summary>
|
---|
44 | /// Gets the rectangle.
|
---|
45 | /// </summary>
|
---|
46 | /// <value>The rectangle.</value>
|
---|
47 | new Rectangle Rectangle
|
---|
48 | {
|
---|
49 | get;
|
---|
50 | }
|
---|
51 |
|
---|
52 | // ------------------------------------------------------------------
|
---|
53 | /// <summary>
|
---|
54 | /// Calculates the min size needed to fit this material in.
|
---|
55 | /// </summary>
|
---|
56 | /// <param name="g">Graphics</param>
|
---|
57 | /// <returns>Size</returns>
|
---|
58 | // ------------------------------------------------------------------
|
---|
59 | Size CalculateMinSize(Graphics g);
|
---|
60 |
|
---|
61 | /// <summary>
|
---|
62 | /// Transforms the specified rectangle.
|
---|
63 | /// </summary>
|
---|
64 | /// <param name="rectangle">The rectangle.</param>
|
---|
65 | void Transform(Rectangle rectangle);
|
---|
66 |
|
---|
67 | /// <summary>
|
---|
68 | /// Gets or sets a value indicating whether this <see cref="T:IShapeMaterial"/> is visible.
|
---|
69 | /// </summary>
|
---|
70 | /// <value><c>true</c> if visible; otherwise, <c>false</c>.</value>
|
---|
71 | bool Visible { get; set;}
|
---|
72 | }
|
---|
73 | }
|
---|