本帖最后由 woaishuijia 于 2019-2-21 14:14 编辑
- Public Property Let Width(ByVal NewValue As Double)
- Dim Xmax As Double: Xmax = Xc + 0.5 * NewValue
- Dim Xmin As Double: Xmin = Xc - 0.5 * NewValue
-
- Dim V(7) As Double
- V(0) = Xmin
- V(1) = Rect.Coordinates(1)
- V(2) = Xmax
- V(3) = Rect.Coordinates(3)
- V(4) = Xmax
- V(5) = Rect.Coordinates(5)
- V(6) = Xmin
- V(7) = Rect.Coordinates(7)
- Rect.Coordinates = V
- Call DataUpdate
- End Property
或
- Public Property Let Width(ByVal NewValue As Double)
- Dim Xmax As Double: Xmax = Xc + 0.5 * NewValue
- Dim Xmin As Double: Xmin = Xc - 0.5 * NewValue
-
- Dim V(1) As Double
- V(0) = Xmin
- V(1) = Rect.Coordinates(1)
- Rect.Coordinate(0) = V
- V(1) = Rect.Coordinates(7)
- Rect.Coordinate(3) = V
- V(0) = Xmax
- V(1) = Rect.Coordinates(3)
- Rect.Coordinate(1) = V
- V(1) = Rect.Coordinates(5)
- Rect.Coordinate(2) = V
- Call DataUpdate
- End Property
|