|
| 1 | +/* |
| 2 | + * Copyright 2016-2019 devemux86 |
| 3 | + * |
| 4 | + * This program is free software: you can redistribute it and/or modify it under the |
| 5 | + * terms of the GNU Lesser General Public License as published by the Free Software |
| 6 | + * Foundation, either version 3 of the License, or (at your option) any later version. |
| 7 | + * |
| 8 | + * This program is distributed in the hope that it will be useful, but WITHOUT ANY |
| 9 | + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
| 10 | + * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. |
| 11 | + * |
| 12 | + * You should have received a copy of the GNU Lesser General Public License along with |
| 13 | + * this program. If not, see <http://www.gnu.org/licenses/>. |
| 14 | + */ |
| 15 | +package org.oscim.theme; |
| 16 | + |
| 17 | +import org.oscim.backend.canvas.Bitmap; |
| 18 | +import org.oscim.core.MapElement; |
| 19 | +import org.oscim.theme.styles.RenderStyle; |
| 20 | + |
| 21 | +/** |
| 22 | + * Callback methods for render theme. |
| 23 | + */ |
| 24 | +public abstract class ThemeCallbackAdapter implements ThemeCallback { |
| 25 | + /** |
| 26 | + * @return the resource {@link Bitmap} |
| 27 | + */ |
| 28 | + @Override |
| 29 | + public Bitmap getBitmap(Bitmap bitmap) { |
| 30 | + return bitmap; |
| 31 | + } |
| 32 | + |
| 33 | + /** |
| 34 | + * @return the color-int |
| 35 | + */ |
| 36 | + @Override |
| 37 | + public int getColor(RenderStyle origin, int color) { |
| 38 | + return color; |
| 39 | + } |
| 40 | + |
| 41 | + /** |
| 42 | + * @return the color-int |
| 43 | + */ |
| 44 | + @Override |
| 45 | + public int getColor(String[] keys, String[] values, int color) { |
| 46 | + return color; |
| 47 | + } |
| 48 | + |
| 49 | + /** |
| 50 | + * @return the text |
| 51 | + */ |
| 52 | + @Override |
| 53 | + public String getText(MapElement element, String text) { |
| 54 | + return text; |
| 55 | + } |
| 56 | +} |
0 commit comments