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".

  • Value Integer procedure DrawVerticalGrid procedure DrawhorizontalGrid procedure SetDisplayCaption Value Boolean Private declarations protected Protected declarations public constructor Create AOwner TComponent override procedure Paint override property Orientation TOrientation read FOrientation write SetOrientation Public declarations published Republished properties property Align property Alignment property Anchors property AutoSize property BevelInner property BevelOuter property BevelWidth property BiDiMode property BorderWidth property BorderStyle property Caption property Color property Constraints property Ctl3D property UseDockManager default True property DockSite property DragCursor property DragKind property DragMode property Enabled property FullRepaint property Font property Locked property ParentBiDiMode property ParentColor property ParentCtl3D property ParentFont property ParentShowHint property PopupMenu property ShowHint property TabOrder property TabStop property Visible property OnCanResize property OnClick property OnConstrainedResize property OnContextPopup property OnDockDrop property OnDockOver property OnDblClick property OnDragDrop property OnDragOver property OnEndDock property OnEndDrag property OnEnter property OnExit property OnGetSiteInfo property OnMouseDown property OnMouseMove property OnMouseUp property OnResize property OnStartDock property OnStartDrag property OnUnDock property Left property Top property Width property Height property Cursor property Hint property HelpType property HelpKeyword property HelpContext property HexSize Integer read FHexSize write SetHexSize property DisplayCaption Boolean read FDisplayCaption write SetDisplayCaption Published declarations end procedure Register implementation procedure Register begin RegisterComponents Samples THexGrid end procedure THexGrid ChangedDimensions var I Integer begin for I 0 to High FPoints do Iterate begin FPoints I X 0 FPoints I Y 0 end for if Orientation hxhorizontal then begin FPoints 0 X Hexsize div 4 FPoints 1 X HexSize Hexsize div 4 FPoints 2 X HexSize FPoints 2 Y HexSize div 2 FPoints 3 X HexSize Hexsize div 4 FPoints 3 Y HexSize FPoints 4 X HexSize div 4 FPoints 4 Y HexSize FPoints 5 Y HexSize div 2 end if Orientation hxVertical then begin FPoints 0 X HexSize div 2 FPoints 1 X HexSize FPoints 1 Y HexSize div 4 FPoints 2 X HexSize FPoints 2

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



  • format flowed Content Transfer Encoding 7bit NNTP Posting Host 138 194 49 218 Message ID X Trace newsgroups borland com 1042499296 138 194 49 218 13 Jan 2003 15 08 16 0800 Lines 77 Path newsgroups borland com not for mail Xref newsgroups borland com borland public delphi graphics 54901 unit Polytest The code below was posted by John Hutchings Date Fri 19 Oct 2001 06 20 44 1000 Newsgroups borland public delphi graphics The code below is from Wm Randolph Franklin with some minor modifications for speed It returns 1 for strictly interior points 0 for strictly exterior and 0 or 1 for points on the boundary Comment returns a Boolean interface uses Classes SysUtils IFDEF WINDOWS Wintypes ENDIF IFDEF WIN32 Windows ENDIF IFDEF LINUX Types Untranslated ENDIF function PointInPolygonTest x y N Integer aList Array of TPoint Boolean implementation function PointInPolygonTest x y N Integer aList Array of TPoint Boolean var I J Integer Function xp aVal Integer Integer Begin Result PPoint aList aVal X end Function yp aVal Integer Integer Begin Result PPoint aList aVal Y end begin Result False L Length aList if N 0 then exit J N 1 for I 0 to N 1

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


  • borland com borland public delphi graphics 54903 function PtInPolygon const pt TPoint points array of TPoint NumPts integer boolean var Region HRGN begin Result false Region CreatePolygonRgn Points NumPts Alternate if PtInRegion region pt x pt y then result true DeleteObject region end Jon Lennart Berg wrote in message news 3e233fbf newsgroups borland com Hi Is there any quick way to test if a coordinate is within the range of

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


  • Thanks and here is the final code I have working FUNCTION CCW CounterClockWise PURPOSE Determines given three points if when travelling from the first to the second to the third we travel in a counterclockwise direction RETURN VALUE int 1 if the movement is in a counterclockwise direction 1 if not function CCW p0 p1 p2 TPoint Integer var dx1 dx2 LongInt dy1 dy2 LongInt begin dx1 p1 x p0 x dx2 p2 x p0 x dy1 p1 y p0 y dy2 p2 y p0 y This is basically a slope comparison we don t do divisions because of divide by zero possibilities with pure horizontal and pure vertical lines if dx1 dy2 dy1 dx2 then Result 1 else Result 1 end FUNCTION Intersect PURPOSE Given two line segments determine if they intersect RETURN VALUE TRUE if they intersect FALSE if not function Intersect p1 p2 p3 p4 TPoint Boolean begin Result CCW p1 p2 p3 CCW p1 p2 p4 xmax then xmax pt x if pt y ymax then ymax pt y end prbound Rect xmin ymin xmax ymax Result PtInRect prbound ptTest end FUNCTION G PtInPolygon PURPOSE This routine determines if the point passed is in the polygon It uses the classical polygon hit testing algorithm a horizontal ray starting at the point is extended infinitely rightwards and the number of polygon edges that intersect the ray are counted If the number is odd the point is inside the polygon RETURN VALUE BOOL TRUE if the point is inside the polygon FALSE if not function G PtInPolygon PolyPoints array of TPoint ptTest TPoint Boolean var i Integer pt1 pt2 TPoint wnumintsct Word prbound TRect begin wnumintsct 0 Result False if not G PtInPolyRect PolyPoints ptTest prbound then Exit pt1 ptTest pt2 ptTest pt2 x prbound Right 50 Now

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


  • Mike This works for me function PointInPolygonTest x y Integer aList Array of TPoint Boolean The code below is from Wm Randolph Franklin with some minor modifications for speed It returns 1 for strictly interior points 0 for strictly exterior and 0 or 1 for points on the boundary var L I J Integer Function xp aVal Integer Integer Begin Result PPoint aList aVal X end Function yp aVal Integer

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


  • 2 to 3 n 1 to n n to 0 The PointInPolygon function was done in a hurry and has not been tested Feel free to send me a note if there are any questions type TPolygon array 0 0 of TPoint function PointInPolygon P TPoint Polygon TPolygon Points Integer Integer Returns 1 point P inside polygon 0 point P on edge of polygon 1 point P outside polygon var Index Integer Count Integer Vars for calculating intersection between partition and division line Use real types Extended to avoid aritmetic overflow Denominator Extended Numerator Extended Fraction Extended XPar YPar Extended starting point of partition line XDiv YDiv Extended starting point of division line dXPar dYPar Extended delta slope of partition line dXDiv dYDiv Extended delta slope of division line begin Result 1 if Points 0 do begin Compute the delta X and delta Y for the current division edge line XDiv Polygon Index X dXDiv Polygon Index 1 mod Points X dXDiv dXDiv XDiv YDiv Polygon Index Y dYDiv Polygon Index 1 mod Points Y dYDiv dYDiv YDiv Compute denominator and numerator to find the relation of the division line to the partition line Denominator dYPar dXDiv dXPar dYDiv Numerator XPar XDiv dYPar YDiv YPar dXPar if not Denominator 0 0 then begin The lines are not parallel Calculat the fraction of the division line for the intersection point Fraction Numerator Denominator if Fraction 0 0 and Fraction 0 0 then Inc Count end end Inc Index end if Result 0 0 then Result Result liDivToRight else if Numerator 0 0 then Result Result liDivToLeft else if Numerator 2147483648 0 and XInt 2147483648 0 and YInt 0 0 then Numerator Numerator Fraction 0 0 end else if P X D2 X and P Y D2 Y then Fraction 1 0

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


  • a polygon region Would need to find out if it is in a polygon roundrect rect circle ellipse etc as well Three methods 1 Create a Windows region using CreatePolygonRgn or equivelent function then use PtInRegion Easy but expensive in memory terms Can be fast is repeat hits are made 2 Create a monochrome bitmap and draw the shape in black and test to see if the pixel at x

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


  • delphi graphics 42091 I wish I could provide proper attribution for the following but I cannot recall where it came from I used it in an application a few years back t is the point in question p q is the line in question function pointonline px py qx qy tx ty integer integer return 0 if t not on line p q 1 if t on open ray ending

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



  •