رسم اطار على الصوره
#2
السلام عليكم
هذه محاولة على السريع
PHP كود :
function FrameBitmap(srcbmp:TBitmap;const FrameColor:TColor=clBlack;FrameWidth:Integer=0):TBitmap;
var
bmp:TBitmap;
w:integer;
begin
 bmp
:=TBitmap.Create;
 
bmp.Width :=srcbmp.Width  ;
 
bmp.Height:=srcbmp.Height ;
 
bmp.Canvas.Draw(0,0,srcbmp);
 
bmp.Canvas.Brush.Color:= FrameColor;
 
bmp.Canvas.Pen.Color:= FrameColor;
 if 
FrameWidth <>0 then
   begin
    
for w := 0 to  FrameWidth do
    
bmp.Canvas.FrameRect(Rect(w,w,bmp.Width-w,bmp.Height-w));
   
end else
    
bmp.Canvas.FrameRect
    
(Rect(0,0,bmp.Width,bmp.Height));

 
Result:= bmp;
 
//bmp.Free;
end; 
الاستعمال
PHP كود :
Self.Image2.Picture.Bitmap:=FrameBitmap(Self.Image1.Picture.Bitmap,clRed,4); 

يجدر الذكر أن الصورة لازم تكون من نوع bmp
الرد


الردود في هذا الموضوع
رسم اطار على الصوره - بواسطة Anew - 11-03-2013, 06:10 PM
رسم اطار على الصوره - بواسطة SMP3 - 11-03-2013, 09:09 PM
رسم اطار على الصوره - بواسطة لؤي - 11-03-2013, 09:20 PM
رسم اطار على الصوره - بواسطة Anew - 12-03-2013, 10:44 AM
رسم اطار على الصوره - بواسطة SMP3 - 12-03-2013, 11:09 AM

التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم