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

  • LoadFromFile ImageName TempJPegImage SaveToStream TempFileStream Finally TempJPEGImage Free End Finally TempFileStream Free End And to load them again TempFileStream TFileStream Create Globals SLIFileName fmOpenRead OR fmShareDenyWrite Try TempJPegImage TJPegImage Create Try TempJPegImage LoadFromStream TempFileStream Whereever Canvas Draw 0 0 TempJPegImage Finally TempJPegImage Free End Finally TempFileStream Free End If you have more than one image stored in your BIG file I guess you have a file position table might help

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



  • practically feasible or would they end up being very slow This is a feature of Windows 2000 the geek o zines have had articles about using transparency MSDN magazine previously called MSJ was where I saw it I believe To make a semi transparent form that would work in any other environment I guess you d have to create a region defining the form s rectangle punch out every third pixel or so and then use SetWindowRgn to assign that region to the window It might be ugly Yeah it is Try this Create a new project with a small main form that s not sizeable Drop a label on it with caption I am becoming semi transparent Now use this for its OnActivate handler procedure TForm1 FormActivate Sender TObject const first boolean true VAR R R1 HRgn co ro I Integer Pt TPoint begin IF NOT First THEN Exit First False Show Application ProcessMessages Pt Point 0 0 Pt ClientToScreen Pt Pt X Pt X Left Pt Y Pt Y Top Cursor crHourglass R CreateRectRgn 0 0 Width Height FOR ro Pt Y TO Pt Y ClientHeight DO FOR co Pt X TO Pt X ClientWidth DO IF Odd

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


  • 8 X Trace dnews 1003675056 172 190 235 8 21 Oct 2001 07 37 36 0700 Lines 59 Path dnews Xref dnews borland public delphi graphics 42999 In article Gordon Whittam wrote But if you use paths ellipse won t work in W95 You ll need polyline and polybezier Lies lies all lies just PolyBezier You get a vertical line if you use a mixture using paths K 0 552284798 will give you an elliptical shape procedure DrawBullet aCanvas TCanvas TopLeft BottomRight TPoint NoseLength integer K single 0 5522847498 var dx dy single halfY integer br tl TPoint pb array 0 15 of TPoint begin br BottomRight tl TopLeft dx NoseLength if dx br x tl x then dx br x tl x dy br y tl y 2 if dy 4 then exit halfY round tl y dy the straight bits pb 0 Point round br x dx br y pb 1 pb 0 pb 2 Point tl x br y pb 3 pb 2 pb 4 pb 2 pb 5 tl pb 6 pb 5 pb 7 pb 5 pb 8 Point round br x dx tl y pb 9 Point round br x dx tl y the

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


  • dimensions of the control Any comments unit EXSShape interface uses Windows Messages SysUtils Classes Graphics Controls Forms Dialogs ExtCtrls type TEXSShapeType stRectangle stSquare stRoundRect stRoundSquare stEllipse stCircle stStar TEXSShape class TShape private Private declarations FRegion HRGN FPen TPen FBrush TBrush FMouseInControl FDragging Boolean FShape TEXSShapeType FOnMouseLeave TNotifyEvent FOnMouseEnter TNotifyEvent procedure SetBrush Value TBrush procedure SetPen Value TPen procedure SetShape Value TEXSShapeType procedure MouseEnter procedure MouseLeave protected Protected declarations procedure Paint override procedure MouseMove Shift TShiftState X Y Integer override public Public declarations constructor Create AOwner TComponent override destructor Destroy override procedure DrawStar Rect TRect procedure DrawRectangle A B C D Integer procedure DrawRoundRect A B C D E F Integer procedure DrawEllipse A B C D Integer published Published declarations procedure StyleChanged Sender TObject property Align property Anchors property Brush TBrush read FBrush write SetBrush property DragCursor property DragKind property DragMode property Enabled property Constraints property MouseInControl Boolean read FMouseInControl write FMouseInControl property ParentShowHint property Pen TPen read FPen write SetPen property Shape TEXSShapeType read FShape write SetShape default stRectangle property ShowHint property Visible property OnDragDrop property OnDragOver property OnEndDock property OnEndDrag property OnMouseDown property OnMouseEnter TNotifyEvent read FOnMouseEnter write FOnMouseEnter property OnMouseLeave TNotifyEvent read FOnMouseLeave write FOnMouseLeave property OnMouseMove property OnMouseUp property OnStartDock property OnStartDrag end procedure Register implementation uses Math procedure Register begin RegisterComponents Samples TEXSShape end TShape constructor TEXSShape Create AOwner TComponent begin inherited Create AOwner ControlStyle ControlStyle csReplicatable Width 65 Height 65 FPen TPen Create FPen OnChange StyleChanged FBrush TBrush Create FBrush OnChange StyleChanged FMouseInControl False end destructor TEXSShape Destroy begin FPen Free FBrush Free inherited Destroy end procedure TEXSShape Paint var X Y W H S Integer Rect TRect begin Rect Self GetClientRect with Canvas do begin Pen FPen Brush FBrush X Pen Width div 2 Y X W Width Pen Width 1 H Height

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


  • com type TPent array 0 4 of TPoint TForm1 class TForm Label1 TLabel procedure FormCreate Sender TObject procedure Label1DblClick Sender TObject private Private declarations public Public declarations end var Form1 TForm1 implementation R DFM function MakePent X Y L integer TPent var DX1 DY1 DX2 DY2 integer const Sin54 0 809 Cos54 0 588 Tan72 3 078 begin DX1 trunc L Sin54 DY1 trunc L Cos54 DX2 L div 2 DY2 trunc L Tan72 2 Result 0 point X Y Result 1 point X DX1 Y DY1 Result 2 point X DX2 Y DY2 Result 3 point X DX2 Y DY2 Result 4 point X DX1 Y DY1 end procedure DrawPentacle Canvas TCanvas Pent TPent begin with Canvas do begin MoveTo Pent 0 X Pent 0 Y LineTo Pent 2 X Pent 2 Y LineTo Pent 4 X Pent 4 Y LineTo Pent 1 X Pent 1 Y LineTo Pent 3 X Pent 3 Y LineTo Pent 0 X Pent 0 Y end with Canvas end procedure TForm1 FormCreate Sender TObject var L integer Pent TPent StarRgn hRgn const Sin54 0 809 Tan72 3 078 begin Label1 OnDblClick Label1DblClick L trunc Self ClientHeight 10 2 Tan72 Width trunc L Sin54

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


  • 2 ny xh End tjCenterCenter begin nx xw div 2 ny xh div 2 End tjLeftTop Begin nx 0 ny 0 End tjLeftCenter begin nx 0 ny xh div 2 End tjLeftBottom Begin nx 0 ny xh End tjRightCenter begin nx xw ny xh div 2 End tjRightTop Begin nx xw ny 0 End tjRightBottom begin nx xw ny xh End End SetGraphicsMode TheDraw Handle GM Advanced T eM11 1 Cos w 360 Pi 2 T eM22 1 Cos w 360 Pi 2 T eM12 1 Sin w 360 Pi 2 T eM21 1 Sin w 360 Pi 2 T eDX X T eDY Y GetWorldTransform TheDraw Handle O ModifyWorldTransform TheDraw Handle T MWT LEFTMULTIPLY TheDraw Pen Style psClear TheDraw Rectangle nx 1 ny 1 nx xw 3 ny xh 2 TheDraw TextOut nx OperateFont FFontMetrix fX1 SC ny OperateFont TextHeight S SymbolHeight S FFontMetrix fY1 sc S SetPen 0 200 0 0 25 psSolid TheDraw Ellipse nx 1 ny 1 nx 1 ny 1 T eM11 1 T eM22 1 T eM12 0 T eM21 0 T eDX 0 T eDY 0 SetWorldTransform TheDraw Handle O End Procedure TDrawer SymbolLine Poly TXYPointList Distance Double Offset Double StartAngle Double R G B Byte Lib String CharSet Byte Size Double Style TFontStyles Sign Char Var i Segment integer PosX PosY TargetLength CurrentLength Double P pxy TXYpoint s c Double Angle Double locates the angle of symbol at one linepoint Procedure LANGLE j integer VAR s c Double Var x1 x2 y1 y2 l Double Begin x1 Poly Points j x x2 Poly Points j 1 x y1 Poly Points j y y2 Poly Points j 1 y l sqrt sqr x2 x1 sqr y2 y1 s x1 x2 l c y2 y1 l End locates the angle of symbol between to

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


  • mortals As you ve discovered WYSIWYG is really an illusion How to make it work 1 Don t use ANY of the API functions that claim to be able to decide line breaks for you They work but they only work at the current resolution whatever that may be 1 Decide on a standard high resolution that you will use for all of your text placement calculation Microsoft recommends 65536 dpi I actually use a larger value 2 Do all of your text width line spacing etc calculations assuming that high resolution and then round to the actual device resolution In order to do that you ll have to scale your fonts accordingly For example let s say that your actual screen resolution is 96 dpi and you ve decided to use Microsoft s suggested high resolution The ratio is 65536 96 682 67 Now let s say you want to draw some 10 point text To determine the width of the line of text in terms of the high resolution device you ll need to scale everything by the aforementioned ratio In other words in order to simulate 10 point text on a 65536 dpi device you have to select a 6827 point font into your 96 dpi device context and work with that Continuing the example let s assume that the result of a TextWidth call on the line of text is 75342 Dividing by the dpi gives 1 150 inches This is the ideal width of that line of text 3 Place your text on the destination canvas using the ideal dimensions calculated using the technique outlined in 2 For good results you should separately place every word of text For example let s say the text is This is a line of text and you want

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


  • a bitmap here and in another group I came up with an alternate solution and a question While the proposed solution of combining black and white masks with the appropritate CopyMode does work pixels around the edges of curves and diagonals can be altered when font smoothing is turned on This is due to the mask pixels being antialiased This may or may not be a problem depending upon the particular situation I know there is a way to determine if antialiasing is set in code but I can t remember Can someone please remind me Also is there a way to set this in code if available The antialiasing problem can be avoiding by setting a text clipping path Drop a TImage TEdit TPaintBox and TButton on a form Load Image1 with the desired pattern and set Edit1 to the desired font and text The following quickly hacked code for Button1Click will draw patterned text on PaintBox1 var size TSize PaintBox1 Canvas Font Assign Edit1 Font GetTextExtentPoint32 PaintBox1 Canvas Handle PChar Edit1 Text Length Edit1 Text size BeginPath PaintBox1 Canvas Handle TextOut PaintBox1 Canvas Handle 0 0 PChar Edit1 Text Length Edit1 Text EndPath PaintBox1 Canvas Handle SelectClipPath PaintBox1

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



  •