多态横向三分法
<p>此方法就是多态画法和横向三分法结合,
引用场景就是 图片有多态,高度不变,但是宽度不固定可变。
典型应用 标准按钮。
如图<img src="https://www.showdoc.cc/server/api/common/visitfile/sign/767dc2dc6347330853eade0e65e5746b?showdoc=.jpg" alt="" />
有5个状态
默认 鼠标激活 鼠标按下 不可用 选中(焦点)
那么我们就要首先根据状态取出其中的一态,然后对这一态进行三分法填充区域。</p>
<p>foxuiutils同样提供了方法
HorThreeDrawBmp32ByIndex(Dstbmp,SrcBmp:TBitmap32;AW:Integer;ImgSplit:TFoxHorSplit;DstRect,SrcRect:TRect;index:Integer);overload;</p>
<p>HorThreeDrawBmp32ByIndex(Dstbmp,SrcBmp:TBitmap32;AW:Integer;ImgSplit,DstRect,SrcRect:TRect;index:Integer);overload;</p>
<p>dstbmp 目标图
srcbmp 原图
aw 单态的宽度
imgsplit left right 点三分点
dstrect 目标区域
srcrect 原图区域
index 取那一态来填充</p>