1cf2b199e98de71dcac042484800c07366363a734Joe Onorato/*
2cf2b199e98de71dcac042484800c07366363a734Joe Onorato * Copyright (C) 2008 The Android Open Source Project
3cf2b199e98de71dcac042484800c07366363a734Joe Onorato *
4cf2b199e98de71dcac042484800c07366363a734Joe Onorato * Licensed under the Apache License, Version 2.0 (the "License");
5cf2b199e98de71dcac042484800c07366363a734Joe Onorato * you may not use this file except in compliance with the License.
6cf2b199e98de71dcac042484800c07366363a734Joe Onorato * You may obtain a copy of the License at
7cf2b199e98de71dcac042484800c07366363a734Joe Onorato *
8cf2b199e98de71dcac042484800c07366363a734Joe Onorato *      http://www.apache.org/licenses/LICENSE-2.0
9cf2b199e98de71dcac042484800c07366363a734Joe Onorato *
10cf2b199e98de71dcac042484800c07366363a734Joe Onorato * Unless required by applicable law or agreed to in writing, software
11cf2b199e98de71dcac042484800c07366363a734Joe Onorato * distributed under the License is distributed on an "AS IS" BASIS,
12cf2b199e98de71dcac042484800c07366363a734Joe Onorato * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13cf2b199e98de71dcac042484800c07366363a734Joe Onorato * See the License for the specific language governing permissions and
14cf2b199e98de71dcac042484800c07366363a734Joe Onorato * limitations under the License.
15cf2b199e98de71dcac042484800c07366363a734Joe Onorato */
16cf2b199e98de71dcac042484800c07366363a734Joe Onorato
1776324fcabecc1bd6977b3f6242efe65e60688319Andy Stadlerpackage com.android.systemui.statusbar.tablet;
18cf2b199e98de71dcac042484800c07366363a734Joe Onorato
19cf2b199e98de71dcac042484800c07366363a734Joe Onoratoimport android.content.Context;
2076324fcabecc1bd6977b3f6242efe65e60688319Andy Stadlerimport android.graphics.Canvas;
21cf2b199e98de71dcac042484800c07366363a734Joe Onoratoimport android.util.AttributeSet;
22cf2b199e98de71dcac042484800c07366363a734Joe Onoratoimport android.view.View;
23cf2b199e98de71dcac042484800c07366363a734Joe Onorato
24cf2b199e98de71dcac042484800c07366363a734Joe Onoratopublic class PanelBackgroundView extends View {
2576324fcabecc1bd6977b3f6242efe65e60688319Andy Stadler    /*
26cf2b199e98de71dcac042484800c07366363a734Joe Onorato    private Bitmap mTexture;
27cf2b199e98de71dcac042484800c07366363a734Joe Onorato    private Paint mPaint;
28cf2b199e98de71dcac042484800c07366363a734Joe Onorato    private int mTextureWidth;
29cf2b199e98de71dcac042484800c07366363a734Joe Onorato    private int mTextureHeight;
3076324fcabecc1bd6977b3f6242efe65e60688319Andy Stadler    */
3176324fcabecc1bd6977b3f6242efe65e60688319Andy Stadler
32cf2b199e98de71dcac042484800c07366363a734Joe Onorato    public PanelBackgroundView(Context context, AttributeSet attrs) {
33cf2b199e98de71dcac042484800c07366363a734Joe Onorato        super(context, attrs);
34cf2b199e98de71dcac042484800c07366363a734Joe Onorato        /*
3576324fcabecc1bd6977b3f6242efe65e60688319Andy Stadler        mTexture = BitmapFactory.decodeResource(getResources(),
36cf2b199e98de71dcac042484800c07366363a734Joe Onorato                com.android.internal.R.drawable.status_bar_background);
37cf2b199e98de71dcac042484800c07366363a734Joe Onorato        mTextureWidth = mTexture.getWidth();
38cf2b199e98de71dcac042484800c07366363a734Joe Onorato        mTextureHeight = mTexture.getHeight();
39cf2b199e98de71dcac042484800c07366363a734Joe Onorato
40cf2b199e98de71dcac042484800c07366363a734Joe Onorato        mPaint = new Paint();
41cf2b199e98de71dcac042484800c07366363a734Joe Onorato        mPaint.setDither(false);
42cf2b199e98de71dcac042484800c07366363a734Joe Onorato        */
43cf2b199e98de71dcac042484800c07366363a734Joe Onorato    }
44cf2b199e98de71dcac042484800c07366363a734Joe Onorato
45cf2b199e98de71dcac042484800c07366363a734Joe Onorato    @Override
46cf2b199e98de71dcac042484800c07366363a734Joe Onorato    public void onDraw(Canvas canvas) {
47cf2b199e98de71dcac042484800c07366363a734Joe Onorato        /*
48cf2b199e98de71dcac042484800c07366363a734Joe Onorato        final Bitmap texture = mTexture;
49cf2b199e98de71dcac042484800c07366363a734Joe Onorato        final Paint paint = mPaint;
50cf2b199e98de71dcac042484800c07366363a734Joe Onorato
51cf2b199e98de71dcac042484800c07366363a734Joe Onorato        final int width = getWidth();
52cf2b199e98de71dcac042484800c07366363a734Joe Onorato        final int height = getHeight();
53cf2b199e98de71dcac042484800c07366363a734Joe Onorato
54cf2b199e98de71dcac042484800c07366363a734Joe Onorato        final int textureWidth = mTextureWidth;
55cf2b199e98de71dcac042484800c07366363a734Joe Onorato        final int textureHeight = mTextureHeight;
56cf2b199e98de71dcac042484800c07366363a734Joe Onorato
57cf2b199e98de71dcac042484800c07366363a734Joe Onorato        int x = 0;
58cf2b199e98de71dcac042484800c07366363a734Joe Onorato        int y;
59cf2b199e98de71dcac042484800c07366363a734Joe Onorato
60cf2b199e98de71dcac042484800c07366363a734Joe Onorato        while (x < width) {
61cf2b199e98de71dcac042484800c07366363a734Joe Onorato            y = 0;
62cf2b199e98de71dcac042484800c07366363a734Joe Onorato            while (y < height) {
63cf2b199e98de71dcac042484800c07366363a734Joe Onorato                canvas.drawBitmap(texture, x, y, paint);
64cf2b199e98de71dcac042484800c07366363a734Joe Onorato                y += textureHeight;
65cf2b199e98de71dcac042484800c07366363a734Joe Onorato            }
66cf2b199e98de71dcac042484800c07366363a734Joe Onorato            x += textureWidth;
67cf2b199e98de71dcac042484800c07366363a734Joe Onorato        }
68cf2b199e98de71dcac042484800c07366363a734Joe Onorato        */
69cf2b199e98de71dcac042484800c07366363a734Joe Onorato    }
70cf2b199e98de71dcac042484800c07366363a734Joe Onorato}
71