Android Canvas (Part 2): Clipping
Canvas clipping limits the drawing region: only content within the clipped area is visible. ...
Canvas clipping limits the drawing region: only content within the clipped area is visible. ...
A View renders its content by “drawing” — using a canvas (Canvas) and a paintbrush (Paint). The Canvas obtained through the onDraw method is directly composited onto the View. ...
...
When you first start writing custom Views in Android, it’s common to feel unsure where to begin. Generally, there are two approaches: From scratch: Extend View and implement the appearance entirely through calculation and drawing. Extend an existing View: Add child views to an existing component, or override methods to change its behavior. ...
This is the first post of this blog. I referenced many Jekyll templates at the time, adapted a custom theme inspired by Pure, and hosted it on GitHub. Source code: haoxiqiang-template Jekyll Overview Jekyll is a static site generator that converts plain text (Markdown, Liquid templates) into a complete static website without requiring a database. Combined with GitHub Pages, it provides free blog hosting. Features Code Highlighting Jekyll has built-in syntax highlighting powered by Rouge: 1 2 3 4 5 def print_hi(name) puts "Hi, #{name}" end print_hi('Tom') #=> prints 'Hi, Tom' LaTeX Math Rendering Set latex: true in the page front matter to enable MathJax rendering: $$ \begin{aligned} \dot{x} &= \sigma(y-x) \ \dot{y} &= \rho x - y - xz \ \dot{z} &= -\beta z + xy \end{aligned} $$ $$ a^2 + b^2 = c^2 $$ When $a \ne 0$, there are two solutions to $ax^2 + bx + c = 0$. Excerpt Separator Use ` ...