Owen Lin | a2fba68 | 2011-08-17 22:07:43 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2010 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package com.android.gallery3d.ui; |
| 18 | |
| 19 | // Texture is a rectangular image which can be drawn on GLCanvas. |
| 20 | // The isOpaque() function gives a hint about whether the texture is opaque, |
| 21 | // so the drawing can be done faster. |
| 22 | // |
| 23 | // This is the current texture hierarchy: |
| 24 | // |
| 25 | // Texture |
| 26 | // -- ColorTexture |
Chih-Chung Chang | 1b2af5e | 2011-09-27 19:44:36 +0800 | [diff] [blame^] | 27 | // -- FadeInTexture |
Owen Lin | a2fba68 | 2011-08-17 22:07:43 +0800 | [diff] [blame] | 28 | // -- BasicTexture |
| 29 | // -- RawTexture |
| 30 | // -- UploadedTexture |
| 31 | // -- BitmapTexture |
| 32 | // -- Tile |
| 33 | // -- ResourceTexture |
| 34 | // -- NinePatchTexture |
| 35 | // -- CanvasTexture |
| 36 | // -- DrawableTexture |
| 37 | // -- StringTexture |
| 38 | // |
| 39 | public interface Texture { |
| 40 | public int getWidth(); |
| 41 | public int getHeight(); |
| 42 | public void draw(GLCanvas canvas, int x, int y); |
| 43 | public void draw(GLCanvas canvas, int x, int y, int w, int h); |
| 44 | public boolean isOpaque(); |
| 45 | } |