Hình 4-4. HTML Designer Visual Studio Tùy chọn hộp thoại để thiết lập cách bố trí hình thức web để "Hoàn toàn vị trí" Tùy chọn "Chắc chắn là vị trí" sử dụng các tính năng định vị tuyệt đối CSS, quy định cụ thể vị trí điểm ảnh để kiểm soát máy chủ | public CanonicalSplineManualO Text Canonical Spline Manually Drawn protected override void OnPaint PaintEventArgs pea pea CanonicalSpline apt fTension void CanonicalSpline Graphics grfx Pen pen Pointf apt float T CanonicalSegment grfx pen aptfo aptfo aptfi apt 2 T CanonicalSegment grfx pen aptfo aptfi apt 2 apt 3 T CanonicalSegment grfx pen aptfi apt 2 apt 3 apt 3 T void CanonicalSegment Graphics grfx Pen pen Point pto Point pti Point pt2 Point pt3 float T Pointf apt new Pointfio float SXi T - float SYi T - float SX2 T - float SY2 T - float AX SXi SX2 2 - 2 float AY SYi SY2 2 - 2 DX DY float BX -2 SXi - SX2 - 3 3 float BY -2 SYi - SY2 - 3 3 float CX SXi float CY SYi float DX float DY for int i 0 i i float t float i - i apt i .X int AX t t t BX t t CX t apt i .Y int AY t t t BY t t CY t pen apt I want to point out a couple things here. The CanonicalSpline method only handles a fou -element a ay and calls CanonicalSegment three times each time displaying one of the three segments. The first segment and the last segment require special treatment because the curve is based on only three points rather than four. The CanonicalSegment method uses an array of only 10 Point structures for each of the segments. That s not quite enough for a smooth curve but it s enough to demonstrate that the method does indeed mimic the DrawCurve method implemented in the Graphics class. I ll have some more sample programs using Bézier splines and canonical splines in Chapters 15 and 19. Chapter 14 Menus Overview The menu is the focal point of most traditional Microsoft Windows applications. Residing just unde the form s title ba the menu essentially lists everything that the program is capable of doing from simple operations like cut and paste to complex jobs like spelling checks. Even if an application supports