2

When creating a custom FireMonkey style, you often run into style objects, such as TButtonStyleObject, that include one or more properties (such as TButtonStyleObject.NormalLink) that are collections of TBitmapLinks. Each individual TBitmapLink defines three properties, CapInsets, Scale, and SourceRect. SourceRect contains the coordinates of a segment of a bitmap that will be used to draw some aspect of the control (see Using TBitmapLinks with the FireMonkey Style Designer for more detail).

My question is, what does CapInsets do?

4

1 回答 1

3

我认为这与如何使用单个位图绘制可调整大小的组件有关。CapInsets 应该代表位图的可拉伸部分,例如,边框分开,以便在调整组件大小时它们不会变得太细或太大。

考虑一个按钮和一个 25x50 像素的位图作为背景。认为它是一个带有小边框的单色矩形。如果将按钮的大小调整为 25x500 像素会怎样?左右边框会变得太大(与上下边框不再成比例)。

除了这篇俄语文章外,我没有找到任何文档(翻译成意大利语非常糟糕,英语对我来说也不太清楚),请查找“背景”部分http://habrahabr.ru/post/137851/

高温高压

于 2014-11-24T22:47:42.963 回答