|
|
|
CalcSize Method, GapPartClass Class |
Calculates the size of the part.
Syntax GapPartClass Class (Softelvdm.Controls)
VB |
Protected Friend Overrides Function CalcSize( _ |
C# |
protected internal override Size CalcSize( |
C++ |
protected friend: virtual Size CalcSize( |
calc
Defines the method to calculate the part's size.
Value |
Description |
|
0 | Calculate the exact size of the part. If possible, the maximum area (r) of the CalcSize method should be honored. This is used by a part to call its own CalcSize method. | |
1 | Calculate the exact size of the part. If possible, the maximum area (r) of the CalcSize method should be honored. This is used by the internal PartsRenderingClass.CalcSize method. | |
2 | Calculate the exact size of the part. If possible, the maximum area (r) of the CalcSize method should be honored. This is used by the internal PartsRenderingClass.StrategyRoutine method. | |
3 | Calculate the exact size of the part. If possible, the maximum area (r) of the CalcSize method should be honored.
|
g
Defines the drawing surface.
pr
Defines the PartsRenderingClass object.
rPartArea
Defines the maximum available area to render the part.
Return Value
The part's size.
Comments
The CalcSize method calculates the size of the part.
If a part can adapt to its surroundings and its maximum available space (r), it should adjust the returned size to reflect the maximum available space. For example, a string as used in the TextPartClass class can wrap around. If a part is wider than the available space, it may be clipped once it is displayed.
Calculating a part's size can be CPU intensive, in which case this routine should attempt to cache values to speed up its performance. The calc parameter can be used to distinguish the reason for the call to CalcSize, which may be helpful to cache values needed to optimize performance.
Version Information
Supported in version 1.0.
Products Table