One, the sprite diagram usage scene:Second, Css Sprite (merit)
Reduce the byte of the picture.
Reduce Web page HTTP requests, which greatly improve the performance of the page.
Solve the web designer in the image naming problems, just a set of pictures named on it, do not need to name every small element, thus improving the production efficiency of the page.
Changing style is convenient
In short, it is an animated image.
Two member variables
1) self. Image = the surface of the image to be displayed
2) self. rect = displays the area of the surface,
Common Methods for setting rect: Self. rect = self. image. get_rect ()
Then set self. rect. topleft = () to set the position in the upper left corner to set the display position of the genie on the screen.
Member Functions
The following are sprite member functions. Update is used to update
Create a sprite based on the picture:
Auto Sprite_back = sprite::create ("Login_background.png");
The wizard that loads the image directly calls the method Setcontentsize () does not work, the picture is still much larger.
So the only thing that can actually be said to change size is the scaling setscale (float x,float y);
The actual project is generally based on the screen to adapt, generally refer to
really worth it?
Increased time costs for coding and maintenanceAfter the picture slice output, the trouble still exists. Although accustomed to this process, button sprite can be easily encoded into CSS, but the other sprites is not so simple.A single button is generally a But what happens when you meet a previous mention of a big sprite like Amazon or Google ?
iOS Game Frame Sprite Kit Basic Tutorial 1th Chapter writing the first Sprite kit program a program is a collection of command sequences written in a computer language to achieve a specific goal or to solve a specific problem. This chapter will write the first Sprite kit Program as the main line, explaining to the developer what the
Css sprite, css sprite generation tool V3.0 update, spritev3.0Major V3.0 improvements
1. added the function of adding and deleting a single image separately.
2. added the. sprite file to save sprite information.
3. added the. sprite file opening function.What is css
what is a css sprite CSS Sprite in the domestic many people called the CSS Wizard, is a Web page image application processing method. It allows you to include all the scattered images of a page in a large image, so that when you visit the page, the loaded picture will not be shown as a picture of the past.Why do you use this tool ?1. Speed up page loadingThe browser accepts the number of simultaneous reques
Zookeeper
After studying the unity3d powerful ngui plug-in for a few days, I think one of the biggest highlights of ngui is the sprite. Let's talk about what the genie is? It can intercept a part in a large image (a big image is a set of images, and a small image is an genie), and then name a genie, you can use the sprite name to draw a video directly, and the Sprite
What are CSS sprite sprites? is used for the front end of a picture application technology, usually, our development of the page may have a lot of pictures, if there are more than 50 small images on a page, which means that the browser to download 50 images individually. CSS Sprite It allows you to include all the scattered images of a page in a single image, so that when you visit a page, you only need to
Tagged with: Sprite sprite sprite ccsprite cocos2d-x cocos2dxCOCOS2DXof theSpritebytexure,Frameand theAnimationcomposition, byOpenesresponsible for rendering. in the game, the genie is an important concept, the game background,NPC, characters, props and so on. In theCocos2d-xin the engine, as long as the picture is shown, basically need to use the Elf class. Firs
Brief introduction:Sprites are the most important elements in 2D games. Most of the visible elements in the game scene are directly or indirectly related to the sprite.In Cococs2d-xz, sprites are represented by sprites, which draw a portion of a texture or all of the rectangular area on the screen.Using an elf table (combining multiple sprites on a single texture) reduces the number of OpenGL ES draws.Sprites can also be used to play animations, to set their colors, or to blend modes with other
Cocos2dx can be used to create a sprite. cocos2dx can be used to create a sprite.Method 1
The most common and simplest method
CCSprite *bg=CCSprite::create("sprite/background.jpg",CCRectMake(0,0,480,320)); bg->setAnchorPoint(ccp(0,0)); bg->setPosition(CCPointZero); addChild(bg);Method 2
Use textures to create sprite
CCImage *image=new CCImage(); i
CSS Sprite image creation, CSS Sprite Image
CSS Sprite:
To improve web page performance and reduce loading times, place small icons that do not change frequently with the website content on a large image and embed the image into the page as a background-image, set the coordinates based on background-position when you need to associate the map.
For example, you
Css sprite generation tool 4.1 updated, css sprite generation tool 4.1
V4.0 address: http://www.cnblogs.com/wang4517/p/4493917.html
This update is mainly used to fix existing bugs. You can directly view the update information on the client and download it by yourself.Fixed problems:
1. Deletion of a single image. Some users have proposed that they cannot select or delete a single image. The solution is p
1 Installing FIS (node and NPM must be installed first): NPM install -g fis3 2 Build project published to the root directory of Output:fis3 Release-d./output Project root directory: The directory where the FIS3 configuration file (default fis-conf.js ) is located is the project root directory.The 3 sprite configuration file (Fis-config.js) is as follows:Fis.match ('::p Ackager ', { spriter:fis.plugin (' Csssprites ')}); Fis.match (' *.css ', {
In the case of mobile adaptation, usually with REM as a long-width unit, so, under different devices, the actual width of the element (PX) is not the same, if it is a single picture as a background picture, the most convenient, as long as the background image set the properties background-size:contain| conver|100% can cover the entire div with a picture.Second, if you use Sprite chart, then you have to change the size and position of the background im
In the previous article described the Ngui dynamic map set function, mentioned Ugui to convert the image of the long sprite format, in fact, there are many online, then I say in this simple,usingunityengine;usingsystem.collections;usingunityengine.ui;publicclass createtexture:monobehaviour{privateimageimage; voidawake () { Image=gameobject.findwithtag ("Image"). GetcomponentThis article is from the "Unity_3d Technology discussion" blog, please be sure
Recently, I visited the product page of fanwe product and noticed that some of the images on this page are dynamic into sprites, such:
From this image, we can see that the background image of the. spritewashings style is dynamically generated through joinimages. ashx. This idea is good, but the style is not generated. Therefore, its HTML uses style = "background-position: 0px-80px" to locate the problem. I personally think this method is not good and should be located by adding a class, in this
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.