{"id":4734,"date":"2017-10-09T17:35:42","date_gmt":"2017-10-09T09:35:42","guid":{"rendered":"http:\/\/blog.qdac.cc\/?p=4734"},"modified":"2017-10-09T17:35:42","modified_gmt":"2017-10-09T09:35:42","slug":"fmx%e5%9c%a8-fmx-%e7%a8%8b%e5%ba%8f%e4%b8%ad%e7%bb%98%e5%88%b6%e5%8d%95%e5%83%8f%e7%b4%a0%e5%ae%bd%e5%ba%a6%e7%9a%84%e7%9b%b4%e7%ba%bf","status":"publish","type":"post","link":"https:\/\/blog.qdac.cc\/?p=4734","title":{"rendered":"[FMX]\u5728 FMX \u7a0b\u5e8f\u4e2d\u7ed8\u5236\u5355\u50cf\u7d20\u5bbd\u5ea6\u7684\u76f4\u7ebf"},"content":{"rendered":"<p>\u5728\u524d\u9762\u7684\u4e00\u7bc7<a href=\"https:\/\/blog.qdac.cc\/?p=4600\">\u6587\u7ae0<\/a>\u4e2d\uff0c\u6211\u4ecb\u7ecd\u4e86\u4e00\u79cd\u7ed8\u5236\u4f4e\u54c1\u8d28\u76f4\u7ebf\u7684\u65b9\u6cd5\uff0c\u4f46\u662f\u8fd9\u4e48\u505a\uff0c\u6548\u7387\u4e0a\u80af\u5b9a\u8981\u6253\u6298\u6263\u7684\u3002\u5728\u548c\u7fa4\u91cc\u7684\u670b\u53cb\u4eec\u4e00\u987f\u4ea4\u6d41\u6298\u817e\u540e\uff0c\u5bf9\u4e8e\u7ed8\u5236\u6c34\u5e73\u6216\u5782\u76f4\u7684\u76f4\u7ebf\uff0c\u73b0\u5728\u6709\u4e24\u79cd\u66f4\u7b80\u5355\u7684\u529e\u6cd5\u6765\u89e3\u51b3\u8fd9\u4e00\u95ee\u9898\uff1a<\/p>\n<ul>\n<li>\u529e\u6cd5\u4e00\uff1a\u4f7f\u7528 FillRect \u6765\u4ee3\u66ff DrawLine \u7ed8\u5236\uff0c\u77e9\u5f62\u533a\u57df\u7684\u5927\u5c0f\u6ce8\u610f\u8981\u5728\u76f8\u5e94\u7684\u65b9\u5411\u4e0a\u52a0 0.5 \u4e2a\u50cf\u7d20\u3002\n<pre class=\"lang:delphi decode:true\">Canvas.BeginScene();\r\nCanvas.Fill.Color:=TAlphaColors.Black;\r\nanvas.FillRect(RectF(10,10,100,10.5),0,0,[],1);\r\nCanvas.EndScene;<\/pre>\n<\/li>\n<li>\u529e\u6cd5\u4e8c\uff1a\u4f7f\u7528 TPointF \u00a0\u7684 SnapToPixel \u65b9\u6cd5\uff0c\u5148\u8f6c\u6362\u5750\u6807\u518d\u5c06\u76f8\u5e94\u7684\u5750\u6807\u4f20\u5165 DrawLine \u505a\u4e3a\u53c2\u6570\u6765\u7ed8\u56fe\u3002\n<pre class=\"lang:delphi decode:true\">Canvas.BeginScene();\r\nCanvas.Stroke.Color:=TAlphaColors.Black;\r\nCanvas.DrawLine(PointF(10,10).SnapToPixel(Canvas.Scale),\r\n  PointF(10,100).SnapToPixel(Canvas.Scale),1 );\r\nCanvas.EndScene;<\/pre>\n<\/li>\n<\/ul>\n<p>\u4e24\u8005\u7684\u6548\u679c\u770b\u8d77\u6765\u90fd\u4e0d\u9519\uff0c\u81f3\u4e8e\u90a3\u4e2a\u6548\u7387\u66f4\u9ad8\uff0c\u6211\u6ca1\u6709\u505a\u6d4b\u8bd5\uff0c\u4f46\u81f3\u5c11\u5e94\u8be5\u6bd4\u6211\u524d\u9762\u6587\u7ae0\u4ecb\u7ecd\u7684\u65b9\u6cd5\u597d\u7684\u591a\uff0c\u4e2a\u4eba\u63a8\u8350\u7b2c\u4e8c\u79cd\u5427\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u524d\u9762\u7684\u4e00\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4ecb\u7ecd\u4e86\u4e00\u79cd\u7ed8\u5236\u4f4e\u54c1 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[145,8,603],"tags":[736,149,540],"class_list":["post-4734","post","type-post","status-publish","format-standard","hentry","category-android","category-delphi","category-603","tag-drawline","tag-fmx","tag-540"],"views":4356,"_links":{"self":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/4734","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4734"}],"version-history":[{"count":1,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/4734\/revisions"}],"predecessor-version":[{"id":4735,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/4734\/revisions\/4735"}],"wp:attachment":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4734"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4734"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4734"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}