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

  • 2 If you are using bunches of Canvas Moveto s and Canvas Linetos the VCL overhead of TCanvas can be significant over the same calls done using straight windows API functions 3 Consider using the Windows PolyLine function instead of sperate calls to moveto and lineto 4 Horizontal and vertical lines can often be drawn faster using the Windows API function PatBlt Hope that helps Joe Dimitrios I Koutsourelis wrote

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



  • Button1Click Sender TObject procedure DrawRoundPolygon Verts array of TPoint Dist Integer Coeff Double 0 5 var Pts array 0 3 of TPoint len TmpD double i dx dy np next nextnext integer begin np High Verts 1 for i 0 to np 1 do begin next i 1 mod np nextnext i 2 mod np dx Verts next x Verts i x dy Verts next y Verts i y len Sqrt Sqr dx Sqr dy TmpD MinValue len 3 Dist Pts 0 X Verts next x Round TmpD dx len Pts 0 Y Verts next y Round TmpD dy len Pts 1 X Verts next x Round Coeff TmpD dx len Pts 1 Y Verts next y Round Coeff TmpD dy len Canvas MoveTo Verts i x Round TmpD dx len Verts i y Round TmpD dy len Canvas LineTo Pts 0 X Pts 0 Y dx Verts nextnext x Verts next x dy Verts nextnext y Verts next y len Sqrt Sqr dx Sqr dy TmpD MinValue len 3 Dist Pts 3 X Verts next x Round TmpD dx len Pts 3 Y Verts next y Round TmpD dy len Pts 2 X Verts next x Round Coeff TmpD

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


  • the size in both dimensions Bit2 TBitmap create Bit2 Width Rect Right Bit2 Height rect Bottom See below Set the new width to be half the original width instead of this I think this does what you want Load BitmapOriginal from disk file Create BitmapHalf that is a stretched version of BitmapOriginal but with half the width and half the height as the original bitmap procedure TFormDemo ButtonDemoClick Sender TObject

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


  • can enlarge to any size up to 2 billion pixels and image it to any dc Joe Ray Cramer wrote in message news 38DF6092 8350A316 pol ac uk This may ba a stupid and or simplistic question but anyway I have a bitmap which I want to enlarge Bingrid goBitMap I create a temporary copy of the area to be enlarged TempBitMap and draw this with StretchDraw This works fine

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


  • Integer Str String var Temp TBitmap TempMode TCopyMode begin Temp TBitmap Create try Temp Width Canvas TextWidth Str Temp Height Canvas TextHeight Str Temp Canvas Brush Color clBlack Temp Canvas FillRect rect 0 0 Temp Width Temp Height Temp Canvas Font Assign Canvas Font Temp Canvas Font Color Temp Canvas Font Color Xor clWhite Temp Canvas Font Color Temp Canvas Font Color Xor Canvas Brush Color Temp Canvas TextOut 0

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


  • ComboBox1 TComboBox ComboBox2 TComboBox procedure ComboBox1DrawItem Control TWinControl Index Integer Rect TRect State TOwnerDrawState procedure FormCreate Sender TObject procedure ComboBox2DrawItem Control TWinControl Index Integer Rect TRect State TOwnerDrawState private Private declarations public Public declarations end var Form1 TForm1 implementation R DFM procedure TForm1 ComboBox1DrawItem Control TWinControl Index Integer Rect TRect State TOwnerDrawState VAR BrushInfo TLogBrush i1 INTEGER i2 INTEGER begin WITH BrushInfo DO BEGIN lbStyle BS SOLID lbColor clBlack lbHatch 0 END Control AS TComboBox Canvas Pen Handle ExtCreatePen PS GEOMETRIC OR PS ENDCAP SQUARE OR PS JOIN MITER index 1 BrushInfo 0 NIL WITH Control AS TComboBox Canvas DO BEGIN i1 MulDiv rect Left rect Right 1 5 i2 MulDiv rect Left rect Right 4 5 MoveTo i1 rect Top rect Bottom DIV 2 LineTo i2 rect Top rect Bottom DIV 2 END end procedure TForm1 FormCreate Sender TObject begin ComboBox1 ItemIndex 0 ComboBox2 ItemIndex 0 end procedure TForm1 ComboBox2DrawItem Control TWinControl Index Integer Rect TRect State TOwnerDrawState VAR BrushInfo TLogBrush i1 INTEGER i2 INTEGER PenStyle DWORD begin WITH BrushInfo DO BEGIN lbStyle BS SOLID lbColor clBlack lbHatch 0 END PenStyle PS GEOMETRIC OR PS ENDCAP SQUARE OR PS JOIN MITER CASE index OF 0 PenStyle PenStyle PS SOLID

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


  • Sender TObject Button TMouseButton Shift TShiftState X Y Integer begin Screen Cursor crCross RestrictCursorToDrawingArea ImageArea see below end procedure TFormLineStretch ImageAreaMouseUp Sender TObject Button TMouseButton Shift TShiftState X Y Integer begin Screen Cursor crDefault RemoveCursorRestrictions see below end Restrict cursor to given rectangular area of a TImage This is convenient while drawing on a canvas since leaving the drawing area can cause problems with some algorithms e g dragging something

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


  • clWhite FillRect Rect 0 0 32 32 Brush Color clBlack Ellipse 10 10 21 21 end end colorBM TBitmap Create with colorBM do begin Height 32 Could Should call GetSystemMetrics to get supported value Assume 32x32 Width 32 with Canvas do begin Brush Color clBlack FillRect Rect 0 0 32 32 Brush Color clLime Ellipse 10 10 21 21 end end with ii do begin fIcon false xHotspot 15 yHotspot

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



  •