Fix cross compilation (e.g. on Darwin). Following changes to make.tmpl,
[AROS.git] / arch / all-pc / boot / grub2-aros / include / grub / bitmap_scale.h
blob927a7cba5ac9f1ad9af4bdef9fa0d9553867b263
1 /* bitmap_scale.h - Bitmap scaling functions. */
2 /*
3 * GRUB -- GRand Unified Bootloader
4 * Copyright (C) 2008,2009 Free Software Foundation, Inc.
6 * GRUB is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * GRUB is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef GRUB_BITMAP_SCALE_HEADER
21 #define GRUB_BITMAP_SCALE_HEADER 1
23 #include <grub/err.h>
24 #include <grub/types.h>
25 #include <grub/bitmap_scale.h>
27 enum grub_video_bitmap_scale_method
29 /* Choose the fastest interpolation algorithm. */
30 GRUB_VIDEO_BITMAP_SCALE_METHOD_FASTEST,
31 /* Choose the highest quality interpolation algorithm. */
32 GRUB_VIDEO_BITMAP_SCALE_METHOD_BEST,
34 /* Specific algorithms: */
35 /* Nearest neighbor interpolation. */
36 GRUB_VIDEO_BITMAP_SCALE_METHOD_NEAREST,
37 /* Bilinear interpolation. */
38 GRUB_VIDEO_BITMAP_SCALE_METHOD_BILINEAR
41 typedef enum grub_video_bitmap_selection_method
43 GRUB_VIDEO_BITMAP_SELECTION_METHOD_STRETCH,
44 GRUB_VIDEO_BITMAP_SELECTION_METHOD_CROP,
45 GRUB_VIDEO_BITMAP_SELECTION_METHOD_PADDING,
46 GRUB_VIDEO_BITMAP_SELECTION_METHOD_FITWIDTH,
47 GRUB_VIDEO_BITMAP_SELECTION_METHOD_FITHEIGHT
48 } grub_video_bitmap_selection_method_t;
50 typedef enum grub_video_bitmap_v_align
52 GRUB_VIDEO_BITMAP_V_ALIGN_TOP,
53 GRUB_VIDEO_BITMAP_V_ALIGN_CENTER,
54 GRUB_VIDEO_BITMAP_V_ALIGN_BOTTOM
55 } grub_video_bitmap_v_align_t;
57 typedef enum grub_video_bitmap_h_align
59 GRUB_VIDEO_BITMAP_H_ALIGN_LEFT,
60 GRUB_VIDEO_BITMAP_H_ALIGN_CENTER,
61 GRUB_VIDEO_BITMAP_H_ALIGN_RIGHT
62 } grub_video_bitmap_h_align_t;
64 grub_err_t
65 EXPORT_FUNC (grub_video_bitmap_create_scaled) (struct grub_video_bitmap **dst,
66 int dst_width, int dst_height,
67 struct grub_video_bitmap *src,
68 enum
69 grub_video_bitmap_scale_method
70 scale_method);
72 grub_err_t
73 EXPORT_FUNC (grub_video_bitmap_scale_proportional)
74 (struct grub_video_bitmap **dst,
75 int dst_width, int dst_height,
76 struct grub_video_bitmap *src,
77 enum grub_video_bitmap_scale_method
78 scale_method,
79 grub_video_bitmap_selection_method_t
80 selection_method,
81 grub_video_bitmap_v_align_t v_align,
82 grub_video_bitmap_h_align_t h_align);
85 #endif /* ! GRUB_BITMAP_SCALE_HEADER */