1
正如您所見,Windows平臺上的形狀組件正常顯示,非常流暢(包括線條,角落和漸變效果)。FMX形狀組件無法正確顯示在Android平臺上
但在Android平臺上,你就會得到一個不能接受的結果:行不再光滑,邊角不能被關閉,梯度變成全黑。
如何發生的?以及如何解決它?
這裏是.fmx文件內容:
object Form1: TForm1
Left = 0
Top = 0
Caption = 'Form1'
ClientHeight = 480
ClientWidth = 640
FormFactor.Width = 320
FormFactor.Height = 480
FormFactor.Devices = [Desktop]
DesignerMasterStyle = 0
object RoundRect1: TRoundRect
Position.X = 40.000000000000000000
Position.Y = 16.000000000000000000
Size.Width = 153.000000000000000000
Size.Height = 65.000000000000000000
Size.PlatformDefault = False
Stroke.Color = claMediumslateblue
Stroke.Thickness = 8.000000000000000000
end
object Pie1: TPie
Position.X = 32.000000000000000000
Position.Y = 96.000000000000000000
Size.Width = 153.000000000000000000
Size.Height = 129.000000000000000000
Size.PlatformDefault = False
Stroke.Color = claChocolate
Stroke.Thickness = 8.000000000000000000
EndAngle = -90.000000000000000000
end
object Arc1: TArc
Position.X = 48.000000000000000000
Position.Y = 224.000000000000000000
Size.Width = 169.000000000000000000
Size.Height = 161.000000000000000000
Size.PlatformDefault = False
Stroke.Color = claDeeppink
Stroke.Thickness = 10.000000000000000000
StartAngle = 30.000000000000000000
EndAngle = 180.000000000000000000
end
object Arc2: TArc
Position.X = 16.000000000000000000
Position.Y = 184.000000000000000000
Size.Width = 233.000000000000000000
Size.Height = 233.000000000000000000
Size.PlatformDefault = False
Stroke.Kind = Gradient
Stroke.Gradient.Points = <
item
Color = xFF297E72
Offset = 0.000000000000000000
end
item
Color = xFFA6F2BD
Offset = 1.000000000000000000
end>
Stroke.Gradient.StartPosition.X = 0.500000000000000000
Stroke.Gradient.StartPosition.Y = 1.000000000000000000
Stroke.Gradient.StopPosition.X = 0.499999970197677600
Stroke.Gradient.StopPosition.Y = 0.000000000000000000
Stroke.Thickness = 20.000000000000000000
Stroke.Cap = Round
EndAngle = -90.000000000000000000
end
end
仍然無法解決我的問題。 – Leo 2014-10-29 03:56:58
您是否需要在運行時更改對象?就像你在做繪畫一樣?如果沒有,有辦法將Windows外觀緩存到位圖。 – FMXExpress 2014-10-31 22:36:18
是的,我需要在運行時更改這些對象。 – Leo 2014-11-07 01:18:09