archive-com.com » COM » E » EFG2.COM

Total: 878

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".

  • TForm1 class TForm Button1 TButton procedure FormCreate Sender TObject procedure Button1Click Sender TObject private Private declarations public PROCEDURE CreateParams VAR Params TCreateParams OVERRIDE end var Form1 TForm1 implementation R DFM procedure TForm1 FormCreate Sender TObject begin Full Screen but still with top Windows title area WindowState wsMaximized end Get rid of top Windows caption bar and border PROCEDURE TForm1 CreateParams VAR Params TCreateParams BEGIN Inherited CreateParams Params WITH Params DO

    Original URL path: http://www.efg2.com/Lab/Library/Delphi/Graphics/FullScreen.pas.TXT (2016-02-14)
    Open archived version from archive



  • 1 MaxNumPlotData of TPoint procedure DrawPolyLine Canvas TCanvas PP PlotPointArray numpts integer var dist m r dx dy xa ya real i pl numps integer space boolean LP TPoint ps array 1 6 of integer tempps TPenStyle DashDist SpaceDist DotDist integer begin DashDist 15 DotDist 5 SpaceDist 5 tempps Canvas Pen Style Case Canvas Pen Style of psSolid begin Canvas PolyLine Slice PP numpts exit end psDash begin numps 2 ps 1 DashDist ps 2 SpaceDist end psDot begin numps 2 ps 1 DotDist ps 2 SpaceDist end psDashDot begin numps 4 ps 1 DashDist ps 2 SpaceDist ps 3 DotDist ps 4 SpaceDist end psDashDotDot begin numps 6 ps 1 DashDist ps 2 SpaceDist ps 3 DotDist ps 4 SpaceDist ps 5 DotDist ps 6 spacedist end psClear exit end Canvas Pen Style psSolid dist 0 space false if numpts 1 then begin Canvas MoveTo PP 1 X PP 1 Y LP X PP 1 X LP Y PP 1 Y end i 1 pl 1 while i 0 then begin m dy dx if dx 0 then xa LP X sqrt r r 1 m m else xa LP X sqrt r r 1 m m ya LP

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/2001/0620.txt (2016-02-14)
    Open archived version from archive


  • eden foundation org Newsgroups borland public delphi graphics This is the function I use The main drawback with it is that I don t think it s particular fast but it draws a dotted line at least Hope it helps Draws a dotted line This function is used to circumvent the limitation in Windows 95 that prohibits the GDI from outputting lines wider than a pen width of 1 that are not solid Parameters Canvas The Canvas to draw the line on P1 P2 The starting and ending coordinates of the line procedure DrawDottedLine Canvas TCanvas P1 P2 TPoint var xStyle TPenStyle Slant Extended Length Extended Fill Jump Segment SegNum Integer Pos EndPos TPoint LengthDone Extended begin xStyle Canvas Pen Style Canvas Pen Style psSolid Slant Angle P1 P2 Length Distance P1 P2 Fill 10 Canvas Pen Width 1 5 Jump Fill 2 div 3 Segment Jump Fill SegNum 0 LengthDone 0 Pos P1 while LengthDone Length do begin Pos X P1 X Round CirculDistX Slant Segment SegNum Pos Y P1 Y Round CirculDistY Slant Segment SegNum Canvas PenPos Pos if Length LengthDone Fill then EndPos P2 else begin EndPos X Pos X Round CirculDistX Slant Fill EndPos Y Pos

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/1999/0716a.txt (2016-02-14)
    Open archived version from archive


  • many tiny line segments using a solid pen One of the parameters to the procedure was a string indicating the pattern which looked like morse code any arrangement of dots and dashes is allowed However the procedure is ugly It will handle polylines and if a polyline vertex falls right in the middle of a dash then the dash will bend around the corner correctly The LineTo method of TCanvas cannot reliably render dashed lines more than one pixel wide This procedure provides a work around Copyright c 1996 G Williams gw at objectpascal dot org procedure PlotDashedLine const Canvas TCanvas const Vertices array of TPoint const Pattern String const DashLength Integer var PenDown Boolean Index Integer procedure PlotTo const Position TPoint begin with Canvas Position do if PenDown then LineTo X Y else MoveTo X Y end function Advance const Distance Integer Boolean var DistanceRemaining Single DistanceToNextVertex Single begin Result FALSE DistanceRemaining Distance DistanceToNextVertex PointDist Canvas PenPos Vertices Index while DistanceRemaining DistanceToNextVertex do begin DistanceRemaining DistanceRemaining DistanceToNextVertex PlotTo Vertices Index Inc Index if Index High Vertices then Exit DistanceToNextVertex PointDist Canvas PenPos Vertices Index SEE COMMENT AT BOTTOM end with Canvas PenPos do if FltEqual DistanceToNextVertex 0 then PlotTo Vertices Index else PlotTo Point Round X DistanceRemaining DistanceToNextVertex Vertices Index X X Round Y DistanceRemaining DistanceToNextVertex Vertices Index Y Y Result TRUE end var PatternIndex Integer OldPenStyle TPenStyle begin OldPenStyle Canvas Pen Style Canvas Pen Style psSolid Canvas MoveTo Vertices 0 X Vertices 0 Y PatternIndex 1 Index 1 while TRUE do begin PenDown TRUE case Pattern PatternIndex of if not Advance 0 then Break if not Advance DashLength then Break else ShowError end PenDown FALSE if not Advance DashLength then Break Inc PatternIndex if PatternIndex Length Pattern then PatternIndex 1 end Canvas Pen Style OldPenStyle end From G

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/2001/0404b.txt (2016-02-14)
    Open archived version from archive


  • override procedure FillBitmap virtual public property Active Boolean read FActive write SetActive constructor Create AOwner TComponent override destructor Destroy override published property ScrollDown Boolean read FScrollDown write FScrollDown property Justify TJustification read FJust write FJust default tjCenter property Items TStringList read FItems write SetItems property OnDone TNotifyEvent read FOnDone write FOnDone Publish inherited properties property Align property Alignment property BevelInner property BevelOuter property BevelWidth property BorderWidth property BorderStyle property Color property Ctl3D property Font property Locked property ParentColor property ParentCtl3D property ParentFont property Visible property OnClick property OnDblClick property OnMouseDown property OnMouseMove property OnMouseUp property OnResize end procedure Register implementation constructor TddgMarquee Create AOwner TComponent constructor for TddgMarquee class procedure DoTimer procedure sets up TddgMarquee s timer begin FTimer TTimer Create Self with FTimer do begin Enabled False Interval TimerInterval OnTimer DoTimerOnTimer end end begin inherited Create AOwner FItems TStringList Create instanciate string list DoTimer set up timer set instance variable default values Width 100 Height 75 FActive False FScrollDown False FJust tjCenter BevelWidth 3 end destructor TddgMarquee Destroy destructor for TddgMarquee class begin SetActive False FTimer Free free allocated objects FItems Free inherited Destroy end procedure TddgMarquee DoTimerOnTimer Sender TObject This method is executed in respose to a timer event begin IncLine only repaint within borders InvalidateRect Handle InsideRect False end procedure TddgMarquee IncLine this method is called to increment a line begin if not FScrollDown then if Marquee is scrolling upward begin Check to see if marquee has scrolled to end yet if FItems Count LineHi ClientRect Bottom ScrollPixels CurrLine then not at end so increment current line Inc CurrLine ScrollPixels else SetActive False end else begin if Marquee is scrolling downward Check to see if marquee has scrolled to end yet if CurrLine ScrollPixels then not at end so decrement current line Dec CurrLine ScrollPixels else SetActive

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/1999/1007a.txt (2016-02-14)
    Open archived version from archive


  • from the LineStretch progam in the Graphics section of efg s Computer Lab www infomaster net external efg Discovered I was using a dumb way to do this Corrected 8 13 98 PROCEDURE RestrictCursorToDrawingArea CONST Image TImage VAR CursorClipArea TRect

    Original URL path: http://www.efg2.com/Lab/Library/Delphi/Graphics/RestrictCursor.txt (2016-02-14)
    Open archived version from archive


  • not in a control anymore Provide a handler for the Delphi custom CM MOUSELEAVE message Here s an example unit Mousie interface uses Windows Messages SysUtils Classes Graphics Controls Forms Dialogs type TMousie class TGraphicControl private FOnMouseEnter TNotifyEvent FOnMouseLeave TNotifyEvent protected procedure DoMouseEnter dynamic procedure DoMouseLeave dynamic procedure CMMouseEnter var Message TMessage message CM MOUSEENTER procedure CMMouseLeave var Message TMessage message CM MOUSELEAVE published property OnMouseEnter TNotifyEvent read FOnMouseEnter write

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/1999/0226b.txt (2016-02-14)
    Open archived version from archive


  • for speed but you could draw using some other method procedure TForm1 FormMouseDown Sender TObject Button TMouseButton Shift TShiftState X Y Integer begin MouseDown true lastx1 x lasty1 y lastx2 x lasty2 y end procedure TForm1 FormMouseMove Sender TObject Shift TShiftState X Y Integer begin if MouseDown then begin drawfocusrect canvas handle Rect lastx1 lasty1 lastx2 lasty2 lastx2 x lasty2 y drawfocusrect canvas handle Rect lastx1 lasty1 lastx2 lasty2 end

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/2001/1021b.txt (2016-02-14)
    Open archived version from archive



  •