文件名称:Color-Lines.ZIP
- 所属分类:
- Dephi控件源码
- 资源属性:
- [Dephi] [Pascal] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 7kb
- 下载次数:
- 0次
- 提 供 者:
- dia tr*******
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
const
maxWidth = 200
maxHeight = 150
var
thumbnail : TBitmap
thumbRect : TRect
begin
thumbnail := Form1.GetFormImage
try
thumbRect.Left := 0
thumbRect.Top := 0
//proportional resize
if thumbnail.Width > thumbnail.Height then
begin
thumbRect.Right := maxWidth
thumbRect.Bottom := (maxWidth * thumbnail.Height) div thumbnail.Width
end
else
begin
thumbRect.Bottom := maxHeight
thumbRect.Right := (maxHeight * thumbnail.Width) div thumbnail.Height
end
thumbnail.Canvas.StretchDraw(thumbRect, thumbnail)
//resize image
thumbnail.Width := thumbRect.Right
thumbnail.Height := thumbRect.Bottom
//display in a TImage control
Image1.Picture.Assign(thumbnail)
finally
thumbnail.Free
end
end -const
maxWidth = 200
maxHeight = 150
var
thumbnail : TBitmap
thumbRect : TRect
begin
thumbnail := Form1.GetFormImage
try
thumbRect.Left := 0
thumbRect.Top := 0
//proportional resize
if thumbnail.Width > thumbnail.Height then
begin
thumbRect.Right := maxWidth
thumbRect.Bottom := (maxWidth * thumbnail.Height) div thumbnail.Width
end
else
begin
thumbRect.Bottom := maxHeight
thumbRect.Right := (maxHeight * thumbnail.Width) div thumbnail.Height
end
thumbnail.Canvas.StretchDraw(thumbRect, thumbnail)
//resize image
thumbnail.Width := thumbRect.Right
thumbnail.Height := thumbRect.Bottom
//display in a TImage control
Image1.Picture.Assign(thumbnail)
finally
thumbnail.Free
end
end
maxWidth = 200
maxHeight = 150
var
thumbnail : TBitmap
thumbRect : TRect
begin
thumbnail := Form1.GetFormImage
try
thumbRect.Left := 0
thumbRect.Top := 0
//proportional resize
if thumbnail.Width > thumbnail.Height then
begin
thumbRect.Right := maxWidth
thumbRect.Bottom := (maxWidth * thumbnail.Height) div thumbnail.Width
end
else
begin
thumbRect.Bottom := maxHeight
thumbRect.Right := (maxHeight * thumbnail.Width) div thumbnail.Height
end
thumbnail.Canvas.StretchDraw(thumbRect, thumbnail)
//resize image
thumbnail.Width := thumbRect.Right
thumbnail.Height := thumbRect.Bottom
//display in a TImage control
Image1.Picture.Assign(thumbnail)
finally
thumbnail.Free
end
end -const
maxWidth = 200
maxHeight = 150
var
thumbnail : TBitmap
thumbRect : TRect
begin
thumbnail := Form1.GetFormImage
try
thumbRect.Left := 0
thumbRect.Top := 0
//proportional resize
if thumbnail.Width > thumbnail.Height then
begin
thumbRect.Right := maxWidth
thumbRect.Bottom := (maxWidth * thumbnail.Height) div thumbnail.Width
end
else
begin
thumbRect.Bottom := maxHeight
thumbRect.Right := (maxHeight * thumbnail.Width) div thumbnail.Height
end
thumbnail.Canvas.StretchDraw(thumbRect, thumbnail)
//resize image
thumbnail.Width := thumbRect.Right
thumbnail.Height := thumbRect.Bottom
//display in a TImage control
Image1.Picture.Assign(thumbnail)
finally
thumbnail.Free
end
end
(系统自动生成,下载前可以参看下载内容)
下载文件列表
ColorLines.cfg
ScreenColorLines.dfm
ColorLines.dpr
BresenhamLibrary.PAS
ScreenColorLines.pas
SpectraLibrary.pas
ColorLines.dof
ColorLines.res
ScreenColorLines.dfm
ColorLines.dpr
BresenhamLibrary.PAS
ScreenColorLines.pas
SpectraLibrary.pas
ColorLines.dof
ColorLines.res