Final class magiccolorsutiles{// Grain = is the gradient GranularityPublic static final void drawstatebar (Graphics g, int RGB, int X, int y, int WID, int HIG, int grain){Int [] rgb1 = {(RGB & 0xff0000) >>> 16, (RGB & 0x00ff00) >>> 8, RGB & 0x0000ff
Background
In the process of application development, it is often seen that some information with different font styles is like the time and charging information on the default lockscreen. In a similar situation, the first possible response is to
Bresenham draw line algorithm
Bresenham algorithm is the most widely used linear scanning conversion algorithm in computer graphics. It is still assumed that the straight line slope is 0 ~ 1. This method is similar to the midpoint method,
Recently, I will slow down to update my blog. The key is that many things have not been completed. Sometimes the program has come out, but I still don't know much about it. It's a bit dumb at first. This application is available inWonderfl has read
Android custom control trainer-wave effect, android trainer
This time I want to draw a wave effect, which is also the first time I want to spray it lightly. First of all, it is a demonstration:
I. First, let's talk about the implementation
Android Graphic demo
How to draw images? Here is a demo for your reference.1. Take a look at the engineering structure:
Ii. Custom view the custom view implements the tracking retention function. The Code is as follows:
Package picturegame. view;
Android makes particle explosion effectIntroduction
When I was hanging out recently, I foundParticle Blast EffectAnd the effect is good.But the code is not easy to expand, that is to say, if you want to provide different explosion effects, you need
A summary of the methods of the Paint and Canvas classes in Android, canvas in Android
Common Methods of the Paint class
1. The setColor method is used to set the color of the paint brush,Public void setColor (int color) // The color parameter is
Android Development notes-personalized TextView (Sina Weibo), Android textview
In the past few days, I have been writing a Sina Weibo client. When processing Weibo information, I have to deal with keyword highlighting and Weibo expressions. I have
Android: simple bullet screen effect implementation, android bullet Screen
First, it is similar to the page where 360 detects harassing calls:
The layout is very simple. The above is a RelativeLayout, and the following Button.
Function:
(1) After
Android custom view and Custom Attributes
This is the content in Android UI Fundamentals.Create a custom View
To create a custom UI component, you must first inherit a View class.First, create a simple custom view to display a cross line. The first
Learn android together and add graffiti (text) to images (37 ),
Source image:
:
The Code is as follows:
Public class GraffitiView extends View {private Paint paint = null;/** source map */private Bitmap originalBitmap = null;/** images to be
Property animation and android property AnimationProperty Animation
Property Animation: One of the many animations provided by Android, from a certain perspective, attribute animation is actually a Tween animation of the enhanced version.
Attribute
Canvas is a canvas. You can use a paint brush to draw any image on it.
Principle:
Canvas can be regarded as a proxy or interface of the Surface. The image is drawn on the Surface. Canvas encapsulates all painting calls. Using Canvas,
The content
Project Practice ①-high imitation zhihu daily (2)-> Use pullrefesh + Slidingmenu + custom components to write the main layout and extjs custom components
① In fact, I didn't think about the layout of the Project architecture. I used my own framework
Basic Android tutorial -- 8.3.1 three graphic tools
In the last two sections, we learned about Drawable and Bitmap. They all load images. In this section, we will learn about drawing-relatedSome APIs are Canvas, Paint, and Path )! This section is
Only such a person with life and freedom, if he struggles for it every day. --GoetheThe contents of this lecture: Tank 2.0 (Object oriented thinking)Request: Draw out our tanks will move, draw enemy tanksOne, the same package under the two documents
Application scenarios
To create different types of objects based on different parameters, it is common to define multiple constructors for calling in different scenarios. But there is a better constructor method that we can implement using the
Canvas refers to the canvas, which is an area on the screen. We can use various APIs to draw what we want. It can be said that canvas runs through the entire 2D graphics, and almost all classes in Android. graphics are directly or indirectly related
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.