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

  • that location the TImage properties go back to normal I like the copied TImage to be faded to distinguish between the original and the copied that is until the copied TImage is placed in the new location I d also like the TImage to move with the mouse just like your cursor moves along the screen Hi Joe Actually I m not sure what you mean by fade out but probably the suitable solution would be to use a dragging to set new position to the image You re always able to force TDragobject descendant to draw the associated Image while dragging by using TDragImageList When the operation will finish successfully dragobject is accepted you can set new coordinates to your TImage Check up the example listed below It s a TDragObject for dragging and drawing the image and code which shows how you can use it drag object s class type TMyDragImageObject class TBaseDragControlObject protected FImageList TDragImageList FImage TImage FMaskColor TColor function GetDragImages TDragImageList override function GetDragCursor Accepted Boolean X Y Integer TCursor override procedure EndDrag Target TObject X Integer Y Integer override procedure SetImage AImage TImage public constructor Create AControl TControl override destructor Destroy override property Image TImage read FImage write SetImage property MaskColor TColor read FMaskColor write FMaskColor end constructor TMyDragImageObject Create AControl TControl begin inherited Create AControl FImage nil FImageList TDragImageList CreateSize 10 10 FMaskColor clMaroon end procedure TMyDragImageObject SetImage AImage TImage var XBitMap TBitMap begin FImageList Clear if Assigned AImage then begin FImage AImage XBitMap TBitMap Create try XBitMap Width AImage Width XBitMap Height AImage Width XBitMap Canvas Draw 0 0 AImage Picture Bitmap FImageList Width XBitMap Width FImageList Height XBitMap Height FImageList AddMasked XBitMap FMaskColor finally XBitMap Free end end Control AImage end destructor TMyDragImageObject Destroy begin FImageList Free FImageList nil inherited end function

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


  • 0700 Path dnews Xref dnews borland public delphi graphics 40041 I finally have found what the problem was In Delphi 6 the csOpaque is only set when the properties Proportional is false Stretch is true and of course if transparent is false In Delphi 5 4 3 csOpaque is set if transparent is false and stretch is true or the bitmap you want to display is greater or equal size of the Timage which make sense Conclusion if you have a bitmap equal size of the image in which it is displayed and you want to draw on it without the flicker effect you have to set the Stretch property in the Timage to true even you don t want the bitmap to get stretched If the bitmap is greater then timage it does not work because it will be stretched Ps I know may things can be done with other techniques but I just want to point out the differences of the Delphi 6 VCL The small code follows Greetings George Pistikos Anadelta Software Delphi 6 procedure TImage PictureChanged Sender TObject var G TGraphic begin if AutoSize and Picture Width 0 and Picture Height 0 then SetBounds Left Top

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


  • MimeOLE V5 50 4133 2400 NNTP Posting Host 194 219 21 174 Message ID X Trace dnews 994262225 194 219 21 174 4 Jul 2001 08 57 05 0700 Path dnews Xref dnews borland public delphi graphics 40333 Here is the listing of the TImage PictureChanged in delphi 6 vcl Delphi 6 procedure TImage PictureChanged Sender TObject var G TGraphic begin if AutoSize and Picture Width 0 and Picture Height

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


  • DoubleBuffered True Dana Paul skrev i en meddelelse news tjk8gim4rpt80c corp supernews co uk Hi folks I ve just moved up from Delphi 3 to Delphi 6 but have found that where I use a line like doodle on a bitmap bmp TBitmap in memory now assign it to the TImage img1 displayed on the form img1 Picture Bitmap Assign bmp to animate an image I now get bad flickering

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


  • I update the items in the listbox However I found that the listbox redraw each item one by one and this causing flickering of the screen How can I prevent the flickering Can I redraw all the items onto an offscreen Canvas before output to the screen s Canvas I have an Drawitem procedure as follows procedure TListBox DrawItem Index Integer Rect TRect State TOwnerDrawState var Bitmap TBitmap bmpWidth dirOffset

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


  • Another Netscape Collabra Server User Mime Version 1 0 Reply To The Patrician Hotmail com Newsgroups borland public delphi graphics put this code in the paint of the TImage to get the update rectangle with which you can calculate which part of the TImage should be redrawn var UpdateRect TRect begin if not GetUpdateRect Handle UpdateRect False then UpdateRect GetClientRect This is the case if you call Repaint adi wrote

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


  • same sizes for animation and they are being drawn one at a time on this TImage using a timer These bitmaps are loaded from a resource into an array of TBitmaps during FormCreate Indeed the animation works but it is too flickery sometimes I can see the small form being redrawn entirely I only wanted the TImage to be redrawn I have Delphi 3 02 C S What simple steps do I need to do to have a smooth animation Image1 Canvas Draw 0 0 WImages ImgNdx Simplified this line is the problem Simplified TImage Canvas is a alias for Image1 Picture Bitmap It allow the access to a assigned bitmap or create a new You modify the bitmap The bitmap inform TImage TImage inform her parent and this inform the WinAPI The WinAPI send a WM PAINT message to the parent the parent erase the area of TImage and inform TImage TImage draw the bitmap I hope you can see a TImage is not a good component for a animation Better is a PaintBox derived from TWinControl not the Delphi PaintBox You inform the PaintBox Invalidate the PaintBox inform the WinAPI the WinAPI send a WM PAINT message and

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


  • is invalidated If this is not enough you can use a cracker class to force the paint routine without an invalidate Using a double buffer will prevent flicker Here s an example TForm1 class TForm Button1 TButton Button2 TButton PaintBox1 TPaintBox procedure Button1Click Sender TObject procedure Button2Click Sender TObject procedure PaintBox1Paint Sender TObject procedure FormCreate Sender TObject procedure FormDestroy Sender TObject private FDoubleBuffer TBitmap end type TPaintBoxCracker class TPaintBox procedure TForm1 Button1Click Sender TObject begin with FDoubleBuffer Canvas do begin Brush Color clWhite FillRect Rect 0 0 FDoubleBuffer Width FDoubleBuffer Height Pen Color clBlue MoveTo FDoubleBuffer Width FDoubleBuffer Height LineTo 0 0 end TPaintBoxCracker PaintBox1 Paint end procedure TForm1 Button2Click Sender TObject begin with FDoubleBuffer Canvas do begin Brush Color clWhite FillRect Rect 0 0 FDoubleBuffer Width FDoubleBuffer Height Pen Color clRed MoveTo 0 0 LineTo FDoubleBuffer Width FDoubleBuffer Height end TPaintBoxCracker PaintBox1 Paint end procedure TForm1 PaintBox1Paint Sender TObject begin PaintBox1 Canvas Draw 0 0 FDoubleBuffer end procedure TForm1 FormCreate Sender TObject begin PaintBox1 ControlStyle PaintBox1 ControlStyle csOpaque FDoubleBuffer TBitmap Create FDoubleBuffer Width PaintBox1 Width FDoubleBuffer Height PaintBox1 Height end procedure TForm1 FormDestroy Sender TObject begin FDoubleBuffer Free end Good luck Sean Dockery Cybersurf Corp Interactive Media Division sean

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



  •