タグ

Rectangleに関するastk_fのブックマーク (1)

  • 【Android】Rectについて

    androidで描画処理を書いているときに、Rectクラスの4点の関係が気になったので、調べてみました。1.矩形の内/外と4点の関係素朴な疑問として、Rectの要素、top / bottom / left / right はRectの中をあらわしているのか、Rectの外をあらわしているのかが気になりました。contains(int x, int y) メソッドの説明を読むと、 Returns true if (x,y) is inside the rectangle. The left and top are considered to be inside, while the right and bottom are not. This means that for a x,y to be contained: left <= x < right and top <= y < botto

  • 1