Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
contains()いくつかの長方形を描画し、そのメソッドを使用する必要がある小さなアプリを作成しています。私の問題は、隠された長方形を描くことです。setStyle(Paint.Style.STROKE),ペイントのthenを使用しようとしていますsetStrokeWidth(0)。しかし、ストロークはまだ見えます。
contains()
setStyle(Paint.Style.STROKE),
setStrokeWidth(0)
ペイント カラーを透明色に設定します。以下を試してください
Paint paint = new Paint(); paint.setColor(0xFF); OR paint.setColor(Color.TRANSPARENT); canvas.drawRect(30, 30, 80, 80, paint);