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