{"id":56,"date":"2025-07-16T10:41:54","date_gmt":"2025-07-16T02:41:54","guid":{"rendered":"https:\/\/www.hgfwq.com\/blog\/?p=56"},"modified":"2025-07-16T10:41:54","modified_gmt":"2025-07-16T02:41:54","slug":"drawroundrect-android-%e6%98%af%e4%bb%80%e4%b9%88%e5%8a%9f%e8%83%bd%e5%8f%8a%e4%bd%bf%e7%94%a8%e4%bc%98%e5%8a%bf%e6%9c%89%e5%93%aa%e4%ba%9b","status":"publish","type":"post","link":"https:\/\/www.hgfwq.com\/blog\/56.html","title":{"rendered":"drawroundrect Android \u662f\u4ec0\u4e48\u529f\u80fd\u53ca\u4f7f\u7528\u4f18\u52bf\u6709\u54ea\u4e9b"},"content":{"rendered":"<p><h3>\u4ec0\u4e48\u662fdrawroundrect Android\uff1f<\/h3>\n<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/www.hgfwq.com\/blog\/wp-content\/uploads\/2025\/07\/4fide2.jpg\" alt=\"drawroundrect Android \u662f\u4ec0\u4e48\u529f\u80fd\u53ca\u4f7f\u7528\u4f18\u52bf\u6709\u54ea\u4e9b\" title=\"drawroundrect Android \u662f\u4ec0\u4e48\u529f\u80fd\u53ca\u4f7f\u7528\u4f18\u52bf\u6709\u54ea\u4e9b\"><\/p>\n<p><p>drawroundrect Android \u662f Android \u7cfb\u7edf\u4e2d\u4e00\u4e2a\u7528\u4e8e\u7ed8\u5236\u5706\u89d2\u77e9\u5f62\u7684 API \u65b9\u6cd5\u3002\u5b83\u5141\u8bb8\u5f00\u53d1\u8005\u5728\u4e00\u4e2a\u753b\u5e03\u4e0a\u7ed8\u5236\u5177\u6709\u6307\u5b9a\u534a\u5f84\u7684\u5706\u89d2\u77e9\u5f62\uff0c\u4ece\u800c\u5b9e\u73b0\u66f4\u52a0\u7f8e\u89c2\u548c\u4e30\u5bcc\u7684\u754c\u9762\u6548\u679c\u3002<\/p>\n<\/p>\n<p><h3>drawroundrect Android \u5305\u542b\u54ea\u4e9b\u5185\u5bb9\uff1f<\/h3>\n<\/p>\n<p><p>drawroundrect Android \u5305\u542b\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/p>\n<\/p>\n<ul>\n<li><strong>canvas<\/strong>\uff1a\u753b\u5e03\u5bf9\u8c61\uff0c\u7528\u4e8e\u5728\u5c4f\u5e55\u4e0a\u7ed8\u5236\u56fe\u5f62\u3002<\/li>\n<li><strong>left<\/strong>\uff1a\u77e9\u5f62\u5de6\u4e0a\u89d2\u7684 x \u5750\u6807\u3002<\/li>\n<li><strong>top<\/strong>\uff1a\u77e9\u5f62\u5de6\u4e0a\u89d2\u7684 y \u5750\u6807\u3002<\/li>\n<li><strong>right<\/strong>\uff1a\u77e9\u5f62\u53f3\u4e0b\u89d2\u7684 x \u5750\u6807\u3002<\/li>\n<li><strong>bottom<\/strong>\uff1a\u77e9\u5f62\u53f3\u4e0b\u89d2\u7684 y \u5750\u6807\u3002<\/li>\n<li><strong>radius<\/strong>\uff1a\u5706\u89d2\u77e9\u5f62\u7684\u5706\u89d2\u534a\u5f84\u3002<\/li>\n<li><strong>paint<\/strong>\uff1a\u7ed8\u5236\u56fe\u5f62\u7684\u753b\u7b14\u5bf9\u8c61\u3002<\/li>\n<\/ul>\n<p><h3>\u5982\u4f55\u4f7f\u7528drawroundrect Android\uff1f<\/h3>\n<\/p>\n<p><p>\u8981\u4f7f\u7528 drawroundrect Android\uff0c\u9996\u5148\u9700\u8981\u521b\u5efa\u4e00\u4e2a\u753b\u5e03\u5bf9\u8c61\u548c\u753b\u7b14\u5bf9\u8c61\u3002\u7136\u540e\uff0c\u901a\u8fc7\u8c03\u7528 drawroundrect \u65b9\u6cd5\uff0c\u4f20\u5165\u76f8\u5e94\u7684\u53c2\u6570\u6765\u7ed8\u5236\u5706\u89d2\u77e9\u5f62\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code>canvas.drawRoundRect(left, top, right, bottom, radius, radius, paint);<\/p>\r\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u63a8\u8350\u4f7f\u7528drawroundrect Android\u7684\u539f\u56e0\uff1f<\/h3>\n<\/p>\n<p><p>\u63a8\u8350\u4f7f\u7528 drawroundrect Android \u7684\u539f\u56e0\u6709\u4ee5\u4e0b\u51e0\u70b9\uff1a<\/p>\n<\/p>\n<ul>\n<li><strong>\u7f8e\u89c2\u6027<\/strong>\uff1a\u5706\u89d2\u77e9\u5f62\u6bd4\u76f4\u89d2\u77e9\u5f62\u66f4\u52a0\u67d4\u548c\uff0c\u4f7f\u754c\u9762\u770b\u8d77\u6765\u66f4\u52a0\u7f8e\u89c2\u3002<\/li>\n<li><strong>\u7b80\u6d01\u6027<\/strong>\uff1adrawroundrect Android \u63d0\u4f9b\u4e86\u7b80\u6d01\u7684 API \u63a5\u53e3\uff0c\u6613\u4e8e\u4f7f\u7528\u3002<\/li>\n<li><strong>\u517c\u5bb9\u6027<\/strong>\uff1adrawroundrect Android \u662f Android \u7cfb\u7edf\u539f\u751f API\uff0c\u5177\u6709\u8f83\u597d\u7684\u517c\u5bb9\u6027\u3002<\/li>\n<\/ul>\n<p><h3>drawroundrect Android \u6709\u54ea\u4e9b\u9650\u5236\uff1f<\/h3>\n<\/p>\n<p><p>drawroundrect Android \u7684\u9650\u5236\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<ul>\n<li><strong>\u6027\u80fd<\/strong>\uff1a\u7ed8\u5236\u5927\u91cf\u5706\u89d2\u77e9\u5f62\u53ef\u80fd\u4f1a\u5bf9\u6027\u80fd\u4ea7\u751f\u4e00\u5b9a\u5f71\u54cd\u3002<\/li>\n<li><strong>\u517c\u5bb9\u6027<\/strong>\uff1a\u5728\u67d0\u4e9b\u4f4e\u7248\u672c Android \u7cfb\u7edf\u4e2d\uff0c\u53ef\u80fd\u4e0d\u652f\u6301\u5706\u89d2\u77e9\u5f62\u7ed8\u5236\u3002<\/li>\n<\/ul>\n<p><h3>\u5982\u4f55\u4f18\u5316drawroundrect Android\u7684\u6027\u80fd\uff1f<\/h3>\n<\/p>\n<p><p>\u4e3a\u4e86\u4f18\u5316 drawroundrect Android \u7684\u6027\u80fd\uff0c\u53ef\u4ee5\u91c7\u53d6\u4ee5\u4e0b\u63aa\u65bd\uff1a<\/p>\n<\/p>\n<ul>\n<li><strong>\u51cf\u5c11\u7ed8\u5236\u6b21\u6570<\/strong>\uff1a\u5c3d\u91cf\u51cf\u5c11\u7ed8\u5236\u5706\u89d2\u77e9\u5f62\u7684\u6b21\u6570\uff0c\u4f8b\u5982\u4f7f\u7528\u7f13\u5b58\u6280\u672f\u3002<\/li>\n<li><strong>\u4f7f\u7528\u786c\u4ef6\u52a0\u901f<\/strong>\uff1a\u5f00\u542f\u786c\u4ef6\u52a0\u901f\uff0c\u63d0\u9ad8\u7ed8\u5236\u6548\u7387\u3002<\/li>\n<li><strong>\u5408\u7406\u8bbe\u7f6e\u534a\u5f84<\/strong>\uff1a\u907f\u514d\u8bbe\u7f6e\u8fc7\u5927\u7684\u5706\u89d2\u534a\u5f84\uff0c\u4ee5\u51cf\u5c11\u7ed8\u5236\u8d1f\u62c5\u3002<\/li>\n<\/ul>\n<p><h3>drawroundrect Android \u4e0e\u5176\u4ed6\u7ed8\u5236\u65b9\u6cd5\u76f8\u6bd4\u6709\u54ea\u4e9b\u4f18\u52bf\uff1f<\/h3>\n<\/p>\n<p><p>drawroundrect Android \u4e0e\u5176\u4ed6\u7ed8\u5236\u65b9\u6cd5\u76f8\u6bd4\uff0c\u5177\u6709\u4ee5\u4e0b\u4f18\u52bf\uff1a<\/p>\n<\/p>\n<ul>\n<li><strong>\u7b80\u6d01\u6027<\/strong>\uff1adrawroundrect Android \u63d0\u4f9b\u4e86\u7b80\u6d01\u7684 API \u63a5\u53e3\uff0c\u6613\u4e8e\u4f7f\u7528\u3002<\/li>\n<li><strong>\u7f8e\u89c2\u6027<\/strong>\uff1a\u5706\u89d2\u77e9\u5f62\u6bd4\u76f4\u89d2\u77e9\u5f62\u66f4\u52a0\u67d4\u548c\uff0c\u4f7f\u754c\u9762\u770b\u8d77\u6765\u66f4\u52a0\u7f8e\u89c2\u3002<\/li>\n<li><strong>\u517c\u5bb9\u6027<\/strong>\uff1adrawroundrect Android \u662f Android \u7cfb\u7edf\u539f\u751f API\uff0c\u5177\u6709\u8f83\u597d\u7684\u517c\u5bb9\u6027\u3002<\/li>\n<\/ul>\n<p><h3><b>\u95ee\u9898 1\uff1a<\/b>drawroundrect Android \u662f\u5426\u652f\u6301\u7ed8\u5236\u4e0d\u540c\u989c\u8272\u7684\u5706\u89d2\u77e9\u5f62\uff1f<\/h3>\n<\/p>\n<p><p>\u662f\u7684\uff0cdrawroundrect Android \u652f\u6301\u7ed8\u5236\u4e0d\u540c\u989c\u8272\u7684\u5706\u89d2\u77e9\u5f62\u3002\u901a\u8fc7\u8bbe\u7f6e paint \u5bf9\u8c61\u7684\u989c\u8272\u5c5e\u6027\uff0c\u53ef\u4ee5\u5b9e\u73b0\u4e0d\u540c\u989c\u8272\u7684\u5706\u89d2\u77e9\u5f62\u7ed8\u5236\u3002<\/p>\n<\/p>\n<p><h3><b>\u95ee\u9898 2\uff1a<\/b>drawroundrect Android \u662f\u5426\u652f\u6301\u7ed8\u5236\u4e0d\u540c\u5927\u5c0f\u7684\u5706\u89d2\u77e9\u5f62\uff1f<\/h3>\n<\/p>\n<p><p>\u662f\u7684\uff0cdrawroundrect Android \u652f\u6301\u7ed8\u5236\u4e0d\u540c\u5927\u5c0f\u7684\u5706\u89d2\u77e9\u5f62\u3002\u901a\u8fc7\u8bbe\u7f6e left\u3001top\u3001right\u3001bottom \u548c radius \u53c2\u6570\uff0c\u53ef\u4ee5\u5b9e\u73b0\u4e0d\u540c\u5927\u5c0f\u7684\u5706\u89d2\u77e9\u5f62\u7ed8\u5236\u3002<\/p>\n<\/p>\n<p><h3><b>\u95ee\u9898 3\uff1a<\/b>drawroundrect Android \u662f\u5426\u652f\u6301\u7ed8\u5236\u900f\u660e\u5ea6\u7684\u5706\u89d2\u77e9\u5f62\uff1f<\/h3>\n<\/p>\n<p><p>\u662f\u7684\uff0cdrawroundrect Android \u652f\u6301\u7ed8\u5236\u900f\u660e\u5ea6\u7684\u5706\u89d2\u77e9\u5f62\u3002\u901a\u8fc7\u8bbe\u7f6e paint \u5bf9\u8c61\u7684\u900f\u660e\u5ea6\u5c5e\u6027\uff0c\u53ef\u4ee5\u5b9e\u73b0\u900f\u660e\u5ea6\u7684\u5706\u89d2\u77e9\u5f62\u7ed8\u5236\u3002<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ec0\u4e48\u662fdrawroundrect Android\uff1f drawroundrect Android \u662f Android \u7cfb\u7edf\u4e2d\u4e00\u4e2a\u7528\u4e8e\u7ed8\u5236\u5706\u89d2\u77e9\u5f62\u7684 API \u65b9\u6cd5\u3002\u5b83\u5141\u8bb8\u5f00\u53d1\u8005\u5728\u4e00\u4e2a\u753b\u5e03\u4e0a\u7ed8\u5236\u5177\u6709\u6307\u5b9a\u534a\u5f84\u7684\u5706\u89d2\u77e9\u5f62\uff0c\u4ece\u800c\u5b9e\u73b0\u66f4\u52a0\u7f8e\u89c2\u548c\u4e30\u5bcc\u7684\u754c\u9762&#8230;<\/p>\n","protected":false},"author":1,"featured_media":57,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[34,36,35],"topic":[],"class_list":["post-56","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-haiwai","tag-android","tag-drawroundrect","tag-35"],"_links":{"self":[{"href":"https:\/\/www.hgfwq.com\/blog\/wp-json\/wp\/v2\/posts\/56","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hgfwq.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hgfwq.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hgfwq.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hgfwq.com\/blog\/wp-json\/wp\/v2\/comments?post=56"}],"version-history":[{"count":1,"href":"https:\/\/www.hgfwq.com\/blog\/wp-json\/wp\/v2\/posts\/56\/revisions"}],"predecessor-version":[{"id":59,"href":"https:\/\/www.hgfwq.com\/blog\/wp-json\/wp\/v2\/posts\/56\/revisions\/59"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hgfwq.com\/blog\/wp-json\/wp\/v2\/media\/57"}],"wp:attachment":[{"href":"https:\/\/www.hgfwq.com\/blog\/wp-json\/wp\/v2\/media?parent=56"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hgfwq.com\/blog\/wp-json\/wp\/v2\/categories?post=56"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hgfwq.com\/blog\/wp-json\/wp\/v2\/tags?post=56"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hgfwq.com\/blog\/wp-json\/wp\/v2\/topic?post=56"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}