Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MoDsT-00009d-KP for mharc-grub-devel@gnu.org; Thu, 17 Sep 2009 06:06:13 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MoDsR-00008k-Mi for grub-devel@gnu.org; Thu, 17 Sep 2009 06:06:11 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MoDsN-00008A-Tt for grub-devel@gnu.org; Thu, 17 Sep 2009 06:06:11 -0400 Received: from [199.232.76.173] (port=43160 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MoDsN-000086-OR for grub-devel@gnu.org; Thu, 17 Sep 2009 06:06:07 -0400 Received: from mail-px0-f191.google.com ([209.85.216.191]:54599) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MoDsM-0005ZY-Tz for grub-devel@gnu.org; Thu, 17 Sep 2009 06:06:07 -0400 Received: by pxi29 with SMTP id 29so256166pxi.14 for ; Thu, 17 Sep 2009 03:06:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=OLOWW7RvgE9j/93e50F3J5krO4V1WvQB5X/xP6r9PcY=; b=AxA3kcvDOL5xGfdQR+R1A+y5m9rlDsUMDbrEJZLqksWcdksYyzKRJ/2wOHqdHC6pHY z74zY7EgPtYAUP63CDE06t2Yo+SMhusIYIPze8jmhg61GzU/Mb+3gdWq1gR4PdPbCjt3 dSsaWTeqRNciuiM9YHVhqRUpsODcc0ENoRo5Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=hgRhm4UrkS6NckkgOYvG+Z3TyueXdMGsxX6URHW+YF7zceexLjtSe6HwtDAczaxrxI pQWKWmJt8U2YUL8buRpTMDfyort9PUxpQXRY+8kLYLmF9gJDnvHXBFMpCaOdYMwcEMs6 JFSOpI/H/AiDk6QD1fUkACFy0h7Q+fotpk25g= MIME-Version: 1.0 Received: by 10.140.131.5 with SMTP id e5mr1159380rvd.205.1253181965100; Thu, 17 Sep 2009 03:06:05 -0700 (PDT) In-Reply-To: References: Date: Thu, 17 Sep 2009 18:06:05 +0800 Message-ID: From: Bean To: The development of GRUB 2 Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [GITGRUB] New menu interface (implementation) X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Sep 2009 10:06:11 -0000 Hi, Update: Merge grub_menu_region_create_rect into grub_menu_region_create_bitmap, it first tries to load the bitmap, if it fails, fallback to rect. To create pure rect, just set the filename to NULL. Adjust video fb function, exports grub_video_fbfill and grub_video_fbblit as they're useful for bitmap to bitmap blit. Extends bitmap scaling support, here is some sample code from menu_test.c: r3 = grub_menu_region_create_bitmap (w, h, "/r3.png", GRUB_VIDEO_BITMAP_SCALE_TYPE_TILING, get_color ("red", 1), ' '); It supports the following scaling type: GRUB_VIDEO_BITMAP_SCALE_TYPE_NORMAL Scale image to dest size GRUB_VIDEO_BITMAP_SCALE_TYPE_CENTER No scaling, draw the image at the center of dest. could leave blanks or truncate the image. GRUB_VIDEO_BITMAP_SCALE_TYPE_TILING No scaling, fill the whole dest area with tiling. GRUB_VIDEO_BITMAP_SCALE_TYPE_MINFIT Keep ratio scaling, it ensures the whole image is displayed (could leave blanks at the margin) GRUB_VIDEO_BITMAP_SCALE_TYPE_MAXFIT Keep ratio scaling, no blanks at the margin, but the image could be truncated. It can optionally OR with a constant that indicate the scaling algorithm, values are: GRUB_VIDEO_BITMAP_SCALE_METHOD_FASTEST (default) GRUB_VIDEO_BITMAP_SCALE_METHOD_BEST GRUB_VIDEO_BITMAP_SCALE_METHOD_NEAREST GRUB_VIDEO_BITMAP_SCALE_METHOD_BILINEAR --- Bean gitgrub home: http://github.com/grub/grub/ my fork page: http://github.com/bean123/grub/