⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.htm

📁 一个不错的画图控件, 大家可以
💻 HTM
📖 第 1 页 / 共 5 页
字号:
                TGraphStreamEvent = procedure(Graph: <A HREF="#TSimpleGraph">TSimpleGraph</A>; GraphObject: <A HREF="#TGraphObject">TGraphObject</A>; Stream: TStream) of object;<BR>
              </STRONG>Occurs  when property settings of a graph object is being read, and the graph object has some custom data. The event handler can read custom data from the stream passed as parameter. </FONT></TD>
            </TR>
            <TR>
              <TD><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif"><STRONG><A NAME="OnObjectWrite" ID="OnObjectWrite"></A>OnObjectWrite: TGraphStreamEvent;<BR>
    TGraphStreamEvent = procedure(Graph: <A HREF="#TSimpleGraph">TSimpleGraph</A>; GraphObject: <A HREF="#TGraphObject">TGraphObject</A>; Stream: TStream) of object;<BR>
              </STRONG>Occurs when property settings of a graph object is being written, and <A HREF="#HasCustomData">HasCustomData</A> property of the graph object is True. The event handler can write custom data in to the stream passed as parameter. </FONT></TD>
            </TR>
            <TR>
              <TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif" SIZE="2"><B><A NAME="OnObjectMouseEnter" ID="OnObjectMouseEnter"></A>OnObjectMouseEnter: TGraphNotifyEvent;</B><BR>
                    <B>TGraphNotifyEvent = procedure(Graph: </B><STRONG><A HREF="#TSimpleGraph">TSimpleGraph</A></STRONG><B>; GraphObject: </B><STRONG><A HREF="#TGraphObject">TGraphObject</A></STRONG><B>) of object; <BR>
                  </B>Occurs when the mouse pointer moves over the graph object. </FONT></TD>
            </TR>
            <TR>
              <TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif" SIZE="2"><B><A NAME="OnObjectMouseLeave" ID="OnObjectMouseLeave"></A>OnObjectMouseLeave: TGraphNotifyEvent;</B><BR>
                    <B>TGraphNotifyEvent = procedure(Graph: </B><STRONG><A HREF="#TSimpleGraph">TSimpleGraph</A></STRONG><B>; GraphObject: </B><STRONG><A HREF="#TGraphObject">TGraphObject</A></STRONG><B>) of object; <BR>
                  </B>Occurs when the mouse pointer moves off from over the graph object. </FONT></TD>
            </TR>
            <TR>
              <TD><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif"><STRONG><A NAME="OnZoomChange"></A>OnZoomChange: TNotifyEvent;</STRONG><BR>
                Occurs when zoom property changes. </FONT></TD>
            </TR>
          </TABLE>
          <BR>
          <TABLE WIDTH="94%" BORDER="1" CELLSPACING="0" CELLPADDING="5" BGCOLOR="#FFFFCC" ALIGN="CENTER">
            <TR> 
              <TD BGCOLOR="#660000"><B><FONT FACE="Verdana, Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">Key 
                Methods</FONT></B></TD>
            </TR>
            <TR> 
              <TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif" SIZE="2"><B>procedure 
                BeginUpdate;</B><BR>
                Suspends screen repainting. </FONT></TD>
            </TR>
            <TR> 
              <TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif" SIZE="2"><B>procedure 
                EndUpdate;</B><BR>
                Re-enables screen repainting.</FONT></TD>
            </TR>
            <TR> 
              <TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif" SIZE="2"><B><A NAME="Draw"></A>procedure 
                Draw(Canvas: TCanvas); <BR>
              </B>Draws the graph  in its actual size on the given canvas. </FONT></TD>
            </TR>
            <TR> 
              <TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif" SIZE="2"><B><A NAME="Print"></A>procedure 
                Print(Canvas: TCanvas; const Rect: TRect); <BR>
                </B>Draws the graph on the canvas in the rectangle specified by 
                the Rect parameter. The Print method maintains the original aspect 
                ratio of the graph. </FONT></TD>
            </TR>
            <TR>
              <TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif" SIZE="2"><B><A NAME="ToggleSelection" ID="ToggleSelection"></A>procedure ToggleSelection(const Rect: TRect; KeepOld: Boolean; GraphObjectClass: <A HREF="#TGraphObjectClass">TGraphObjectClass</A> = nil);<BR>
                </B>Toggles selection state of the objects that intersects the given rectangle. If GraphObjectClass parameter is not nil, the function only toggles selection of  graph objects in the specified class type. When KeepOld is True, the function keeps the previous selected objects still selected, otherwise it deselects them.</FONT></TD>
            </TR>
            <TR>
              <TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif" SIZE="2"><B><A NAME="FindObjectAt"></A></B><STRONG>function FindObjectAt(X, Y: Integer; LookAfter: <A HREF="#TGraphObject">TGraphObject</A> = nil ): <A HREF="#TGraphObject">TGraphObject</A>;<BR>
</STRONG>Returns the graph object that contains the specified point. If no graph object found, the return value is nil. The function starts searching from the graph objects behind the graph object specified by the LookAfter parameter. If LookAfter parameter is nil, the search starts from the top most graph object. </FONT></TD>
            </TR>
            <TR>
              <TD><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif"><STRONG><A NAME="FindObjectByID"></A>function FindObjectByID(ID: DWORD): <A HREF="#TGraphObject">TGraphObject</A>;</STRONG><BR>
                Returns graph object, which its <A HREF="#UniqueID">UniqueID</A> is equal to the value specified by the ID parameter. The function returns nil if search fails. </FONT></TD>
            </TR>
            <TR>
              <TD><P><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif"><STRONG><A NAME="ForEachObject"></A>function ForEachObject(Callback: TGraphForEachMethod; UserData: Integer;
  Selection: Boolean = False): Integer;<BR>
  TGraphForEachMethod = function(GraphObject: TGraphObject; UserData: Integer): Boolean of object;<BR>
              </STRONG>Enumerates all objects (or selected objects) on the graph by passing each object, in turn, to an application-defined callback method specified by the Callback parameter. The function continues until the last object is enumerated or the callback method returns False. The function returns the number of enumerated objects.<BR>
                </FONT><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif">If the Selection parameter is True, the callback method enumerates only selected objects; otherwise it enumerates all the objects. 
                The UserData parameter specifies a 32-bit, application-defined value to be passed to the callback method. <BR>
              </FONT></P>              </TD>
            </TR>
            <TR> 
              <TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif" SIZE="2"><B><A NAME="InsertNode"></A>function 
                InsertNode(const Bounds: TRect; ANodeClass: <A HREF="#TGraphNodeClass">TGraphNodeClass</A> 
                = nil): <A HREF="#TGraphNode">TGraphNode</A>;<BR>
                </B>Inserts a new node object on the graph, and initiates its bounding rectangle with the rectangle specified by the Bounds paraneter. ANodeClass 
                parameter specifies the node class  of the new node object. 
                If ANodeClass is nil, the function creates the node using <A HREF="#DefaultNodeClass">DefaultNodeClass</A> property. The function returns the new inserted node, or nil on case of failure. </FONT></TD>
            </TR>
            <TR> 
              <TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif" SIZE="2"><B><A NAME="InsertLink"></A>function InsertLink(Source, Target: <A HREF="#TGraphObject">TGraphObject</A>;
ALinkClass: <A HREF="#TGraphLinkClass">TGraphLinkClass</A> = nil): <A HREF="#TGraphLink">TGraphLink</A>;<BR>
                </B>Inserts a new link object to connect the two objects specified by Source and Target parameters.  ALinkClass parameter specifies the class  
                of the new link object. If ALinkClass is nil, the function creates 
                the link using <A HREF="#DefaultLinkClass">DefaultLinkClass</A> property. The function returns the new inserted link, or nil on case of failure. </FONT></TD>
            </TR>
            <TR>
              <TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif" SIZE="2"><B>function InsertLink(Source: <A HREF="#TGraphObject">TGraphObject</A>; const Pts: array of TPoint; ALinkClass: <A HREF="#TGraphLinkClass">TGraphLinkClass</A> = nil): <A HREF="#TGraphLink">TGraphLink</A>;<BR>
                </B>Inserts a new link object, which its breakpoints and endpoint are specified by the Pts parameter. The startpoint of the link, hooks to the object specified by the Source parameter.  ALinkClass parameter specifies the class  
                of the new link object. If ALinkClass is nil, the function creates 
                the link using <A HREF="#DefaultLinkClass">DefaultLinkClass</A> property. The function returns the new inserted link, or nil on case of failure. </FONT></TD>
            </TR>
            <TR>
              <TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif" SIZE="2"><B>function InsertLink(const Pts: array of TPoint; Target: <A HREF="#TGraphObject">TGraphObject</A>; ALinkClass: <A HREF="#TGraphLinkClass">TGraphLinkClass</A> = nil): <A HREF="#TGraphLink">TGraphLink</A>;<BR>
              </B>Inserts a new link object, which its startpoint and breakpoints are specified by the Pts parameter. The endpoint of the link, hooks to the object specified by the Target parameter.  ALinkClass parameter specifies the class  
                of the new link object. If ALinkClass is nil, the function creates 
              the link using <A HREF="#DefaultLinkClass">DefaultLinkClass</A> property. The function returns the new inserted link, or nil on case of failure. </FONT></TD>
            </TR>
            <TR>
              <TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif" SIZE="2"><B>function InsertLink(const Pts: array of TPoint; ALinkClass: <A HREF="#TGraphLinkClass">TGraphLinkClass</A> = nil): <A HREF="#TGraphLink">TGraphLink</A>;<BR>
              </B>Inserts a new link object, which its startpoint, breakpoints, and endpoint are specified by the Pts parameter.  ALinkClass parameter specifies the class  
                of the new link object. If ALinkClass is nil, the function creates 
              the link using <A HREF="#DefaultLinkClass">DefaultLinkClass</A> property. The function returns the new inserted link, or nil on case of failure. </FONT></TD>
            </TR>
            <TR>
              <TD><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif"><STRONG>procedure Invalidate;</STRONG><BR>
              Completely repaints control.</FONT></TD>
            </TR>
            <TR>
              <TD><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif"><STRONG><A NAME="InvalidateRect"></A>procedure InvalidateRect(const Rect: TRect);</STRONG><BR>
                Repaints a rectangular area of the control. Rectangle coordinates are in graph coordinates. </FONT></TD>
            </TR>
            <TR>
              <TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif" SIZE="2"><B><A NAME="ScrollCenter" ID="ScrollCenter"></A>procedure ScrollCenter(GraphObject: <A HREF="#TGraphObject">TGraphObject</A>); <BR>
    procedure ScrollCenter(const Rect: TRect); <BR>
    procedure ScrollCenter(const Point: TPoint); <BR>
                </B>Scrolls a graph object, rectangle, or point into center of the control's client area.</FONT></TD>
            </TR>
            <TR> 
              <TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif" SIZE="2"><B><A NAME="ScrollInView"></A>procedure 
                ScrollInView(GraphObject: <A HREF="#TGraphObject">TGraphObject</A>); 
                <BR>
                procedure ScrollInView(const Rect: TRect); <BR>
                procedure ScrollInView(const Point: TPoint); <BR>
                </B>Scrolls a graph object, rectangle, or point into the visible 
                area of the control.</FONT></TD>
            </TR>
            <TR> 
              <TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif" SIZE="2"><B><A NAME="ZoomRect"></A>function 
                ZoomRect(const Rect: TRect): Boolean;</B><BR>
                Zooms the view, so that the specified rectangle fits the client 
                area of the control.</FONT></TD>
            </TR>
            <TR> 
              <TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif" SIZE="2"><B><A NAME="ZoomObject"></A>function 
                ZoomObject(GraphObject: TGraphObject): Boolean;</B><BR>
                Zooms the view, so that the specified object fits the client area 
                of the control.</FONT></TD>
            </TR>
            <TR> 
              <TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif" SIZE="2"><B><A NAME="ZoomSelection"></A>function 
                ZoomSelection: Boolean;</B><BR>
                Zooms the view, so that the selected objects fit the client area 
                of the control.</FONT></TD>
            </TR>
            <TR> 
              <TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif" SIZE="2"><B><A NAME="ZoomGraph"></A>function 
                ZoomGraph: Boolean;</B><BR>
                Zooms the view, so that the graph entirly fits the client area 
                of the control.</FONT></TD>
            </TR>
            <TR>
              <TD><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif"><STRONG><A NAME="ChangeZoom"></A>function ChangeZoom(NewZoom: Integer; Origin: TGraphZoomOrigin): Boolean;<BR>
                TGraphZoomOrigin = (zoTopLeft, zoCenter, zoCursor); <BR>
                </STRONG>Sets zoom factor to the value specified by the NewZoom parameter. The Origin parameter determines how the zoomed area appears on the client area of the control. </FONT>
                <P></P>
                <TABLE WIDTH="90%" BORDER="0" CELLSPACING="5" CELLPADDING="0" ALIGN="CENTER">
                  <TR>
                    <TD WIDTH="15%" VALIGN="TOP"><STRONG><FONT FACE="Verdana, Arial, Helvetica, sans-serif" SIZE="2">zoTopLeft</FONT></STRONG></TD>
                    <TD WIDTH="20"><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif">&nbsp;</FONT></TD>
                    <TD><FONT FACE="Verdana, Arial, Helvetica, sans-serif" SIZE="2">Tries to keep top left cornor of the current view visible. </FONT></TD>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -