Skip to content
This repository has been archived by the owner on Sep 23, 2023. It is now read-only.

google-developer-training/advanced-android-kotlin-drawing-clipping-codelab

Repository files navigation

ClippingExample - Solution code

This app demonstrates how to use and combine clipping regions, and how to draw and transform text on a canvas.

Introduction

Demonstrates how setting different clipping paths affects the drawing of rectangles, lines, text, and circles.

This app draws seven squares that each demonstrates a clipping region, or combination of several clipping regions, including a picture frame, circular clipping, and using a DIFFERENCE and INTERSECT operator when combining clipping regions.

The app also demonstrates how to draw transformed text on a canvas, using translation and skewing.

Pre-requisites

You need to know:

  • How to open, build, and run apps with Android Studio.
  • Draw on a Canvas as demonstrated in SimpleCanvas and CanvasExample.
  • The concept of "clipping" to include and exclude regionsi from drawing.

Getting Started

  1. Download and run the app.

License

Copyright 2017 Google, Inc.

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages