{"id":6059,"date":"2017-11-21T10:00:42","date_gmt":"2017-11-21T01:00:42","guid":{"rendered":"https:\/\/www.gigas-jp.com\/appnews\/?p=6059"},"modified":"2017-11-21T09:27:11","modified_gmt":"2017-11-21T00:27:11","slug":"%e6%96%b0%e4%ba%ba%e7%a0%94%e4%bf%ae%e3%81%ae%e8%a8%98%e9%8c%b2%ef%bc%91","status":"publish","type":"post","link":"https:\/\/www.gigas-jp.com\/appnews\/archives\/6059","title":{"rendered":"\u65b0\u4eba\u7814\u4fee\u306e\u8a18\u9332\uff11"},"content":{"rendered":"<p>\u7814\u4fee\u4e2d\u306b\u5b66\u3093\u3060\u5f79\u7acb\u3064\u6280\u8853\u60c5\u5831\u3092\u66f8\u3044\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u30b2\u30fc\u30e0\u306a\u3069\u3067\u3082\u591a\u7528\u3055\u308c\u308b\u56f3\u5f62\u306e\u91cd\u306a\u308a\u5224\u5b9a\u3001\u3044\u308f\u3086\u308b\u5f53\u305f\u308a\u5224\u5b9a\u3067\u3059\u304c\u3001<br \/>\n \u7814\u4fee\u3067\u30ad\u30e3\u30e9\u30af\u30bf\u30fcA\u3068\u30ad\u30e3\u30e9\u30af\u30bf\u30fcB\u306e\u5ea7\u6a19\u304c\u4e00\u81f4\u3057\u305f\u3068\u304d\u306b\u30d5\u30e9\u30b0\u3092\u7acb\u3066\u308b\u3068\u3044\u3063\u305f\u3088\u3046\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u7d44\u3080\u5834\u9762\u304c\u3042\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000<img loading=\"lazy\" class=\"alignnone size-medium wp-image-6070\" src=\"\/appnews\/wp-content\/uploads\/sites\/4\/2017\/11\/pic-300x223.jpg\" alt=\"\" width=\"300\" height=\"223\" srcset=\"https:\/\/www.gigas-jp.com\/appnews\/wp-content\/uploads\/sites\/4\/2017\/11\/pic-300x223.jpg 300w, https:\/\/www.gigas-jp.com\/appnews\/wp-content\/uploads\/sites\/4\/2017\/11\/pic.jpg 1439w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p><!--more--><\/p>\n<p>\u65b9\u6cd5\u3068\u3057\u3066\u306f\u30ad\u30e3\u30e9\u30af\u30bf\u30fcA\u306e\u5ea7\u6a19\u3092\u8abf\u3079\u3066\u3001\u30ad\u30e3\u30e9\u30af\u30bf\u30fcB\u306e\u5ea7\u6a19\u306b\u91cd\u306a\u308a\u304c\u3042\u308c\u3070\u30d5\u30e9\u30b0\u3092\u7acb\u3066\u308b\u3068\u3044\u3063\u305f\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3067\u7d44\u3080\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\n \u56db\u89d2\u5f62\u306e\u91cd\u306a\u308a\u5224\u5b9a\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<p>\/\/\u56f3\u5f62\u304c\u91cd\u306a\u308b\u3068true\u3092\u8fd4\u3059<br \/>\n boolean isOverlap(x1, y1, int x1, int y1, int w1, int h1, int x2, int y2, int w2, int h2) {<\/p>\n<p>\u3000\u3000boolean checkX = false;<br \/>\n \u3000\u3000boolean checkY = false;<br \/>\n \u3000\u3000<br \/>\n \u3000\u3000\/\/X\u8ef8<br \/>\n \u3000\u3000if((x1 &gt;= x2) &amp;&amp; ((x2+w2) &gt;= x1)){<br \/>\n \u3000\u3000\u3000\u3000checkX = true;<br \/>\n \u3000\u3000}else if((x2 &gt;= x1) &amp;&amp; ((x1+w1) &gt;= x2)){<br \/>\n \u3000\u3000\u3000\u3000checkX = true;<br \/>\n \u3000\u3000}<\/p>\n<p>\u3000\u3000\/\/Y\u8ef8<br \/>\n \u3000\u3000if((y1 &gt;= y2) &amp;&amp; ((y2+h2) &gt;= y1)){<br \/>\n \u3000\u3000\u3000\u3000checkY = true;<br \/>\n \u3000\u3000}else if((y2 &gt;= y1) &amp;&amp; ((y1+h1) &gt;= y2)){<br \/>\n \u3000\u3000\u3000\u3000checkY = true;<br \/>\n \u3000\u3000}<\/p>\n<p> \u3000\u3000return (checkX &amp;&amp; checkY)<br \/>\n \u3000\u3000<br \/>\n }<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\n \u3046\u30fc\u3093\u3001\u898b\u305a\u3089\u3044\u3002\u53ef\u8aad\u6027\u304c\u60aa\u3044\u4e0a\u306b\u4fdd\u5b88\u6027\u3082\u60aa\u305d\u3046\u3002\u3002<\/p>\n<p>\u305d\u3053\u3067\u3001intersects()\u3068\u3044\u3046\u4fbf\u5229\u306a\u30e1\u30bd\u30c3\u30c9\u304c\u3042\u308a\u307e\u3057\u305f\uff01<br \/>\n \u3053\u308c\u3092\u4f7f\u3048\u3070\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u7c21\u5358\u306b\u66f8\u3051\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<p>\/\/\u56f3\u5f62\u304c\u91cd\u306a\u308b\u3068true\u3092\u8fd4\u3059<br \/>\n boolean isOverlap(x1, y1, int x1, int y1, int w1, int h1, int x2, int y2, int w2, int h2) {<br \/>\n \u3000\u3000Rect r1 = new Rect(x1, y1, w1, h1);<br \/>\n \u3000\u3000Rect r2 = new Rect(x2, y2, w2, h2);<\/p>\n<p>\u3000\u3000return Rect.intersects(r1, r2);<br \/>\n }<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>intersects(Rect rect1, Rect rect2)\u306frect1\u3068rect2\u306b\u91cd\u306a\u308a\u304c\u3042\u308c\u3070true\u3092\u8fd4\u3059\u3068\u3044\u3046\u69cb\u9020\u306a\u306e\u3067\u3001<br \/>\n \u69d8\u3005\u306a\u5834\u9762\u306b\u5fdc\u7528\u3067\u304d\u308b\u306e\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u305f\u3060\u3001\u9ad8\u901f\u306b\u30b9\u30ef\u30a4\u30d7\u3057\u305f\u3068\u304d\u306f\u4f8b\u5916\u3067\u3001<br \/>\n \u6307\u306e\u53d6\u5f97\u5ea7\u6a19\u306e\u5024\u304c\u98db\u3093\u3067\u3057\u307e\u3046\u3053\u3068\u304c\u3042\u308a(\u53d6\u5f97\u5ea7\u6a19\u306b\u9023\u7d9a\u6027\u304c\u306a\u3044)\u3001<br \/>\n \u91cd\u306a\u308a\u691c\u51fa\u3067\u304d\u306a\u3044\u5834\u5408\u304c\u3042\u308b\u3053\u3068\u3082\u308f\u304b\u308a\u307e\u3057\u305f\u3002<br \/>\n \u4eca\u5f8c\u306f\u3053\u306e\u3053\u3068\u3082\u8e0f\u307e\u3048\u3066\u4e0a\u624b\u306b\u4f7f\u7528\u3057\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u706b\u66dc\u62c5\u5f53\uff1aTamamo<\/p>\n<div class='wp_social_bookmarking_light'>\n            <div class=\"wsbl_google_plus_one\"><g:plusone size=\"medium\" annotation=\"none\" href=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/6059\" ><\/g:plusone><\/div>\n            <div class=\"wsbl_hatena_button\"><a href=\"\/\/b.hatena.ne.jp\/entry\/https:\/\/www.gigas-jp.com\/appnews\/archives\/6059\" class=\"hatena-bookmark-button\" data-hatena-bookmark-title=\"\u65b0\u4eba\u7814\u4fee\u306e\u8a18\u9332\uff11\" data-hatena-bookmark-layout=\"standard\" title=\"\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0\"> <img src=\"\/\/b.hatena.ne.jp\/images\/entry-button\/button-only@2x.png\" alt=\"\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0\" width=\"20\" height=\"20\" style=\"border: none;\" \/><\/a><script type=\"text\/javascript\" src=\"\/\/b.hatena.ne.jp\/js\/bookmark_button.js\" charset=\"utf-8\" async=\"async\"><\/script><\/div>\n            <div class=\"wsbl_twitter\"><a href=\"https:\/\/twitter.com\/share\" class=\"twitter-share-button\" data-url=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/6059\" data-text=\"\u65b0\u4eba\u7814\u4fee\u306e\u8a18\u9332\uff11\" data-via=\"GIGASJAPAN_APPS\" data-lang=\"ja\">Tweet<\/a><\/div>\n            <div class=\"wsbl_facebook_like\"><div id=\"fb-root\"><\/div><fb:like href=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/6059\" layout=\"button_count\" action=\"like\" width=\"100\" share=\"false\" show_faces=\"false\" ><\/fb:like><\/div>\n            <div class=\"wsbl_facebook_send\"><div id=\"fb-root\"><\/div><fb:send href=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/6059\" colorscheme=\"light\" ><\/fb:send><\/div>\n    <\/div>\n<br class='wp_social_bookmarking_light_clear' \/>\n","protected":false},"excerpt":{"rendered":"<p>\u7814\u4fee\u4e2d\u306b\u5b66\u3093\u3060\u5f79\u7acb\u3064\u6280\u8853\u60c5\u5831\u3092\u66f8\u3044\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002 \u30b2\u30fc\u30e0\u306a\u3069\u3067\u3082\u591a\u7528\u3055\u308c\u308b\u56f3\u5f62\u306e\u91cd\u306a\u308a\u5224\u5b9a\u3001\u3044\u308f\u3086\u308b\u5f53\u305f\u308a\u5224\u5b9a\u3067\u3059\u304c\u3001 \u7814\u4fee\u3067\u30ad\u30e3\u30e9\u30af\u30bf\u30fcA\u3068\u30ad\u30e3\u30e9\u30af\u30bf\u30fcB\u306e\u5ea7\u6a19\u304c\u4e00\u81f4\u3057\u305f\u3068\u304d\u306b\u30d5\u30e9\u30b0\u3092\u7acb\u3066\u308b\u3068\u3044\u3063\u305f\u3088\u3046\u306a\u30d7\u30ed\u30b0 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[100,12],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/6059"}],"collection":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/comments?post=6059"}],"version-history":[{"count":10,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/6059\/revisions"}],"predecessor-version":[{"id":6071,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/6059\/revisions\/6071"}],"wp:attachment":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/media?parent=6059"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/categories?post=6059"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/tags?post=6059"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}