Allegro 5 C++ GUI on Fedora 25

Today, I did a clean install of Fedora 25 Workstation that was released a few days ago.  The installation went pretty well. One hiccup at the very end where it could not remove an old efi file in the boot partition, but that was not a real issue. The install screens are the same as for Fedora 24 and the process is fairly smooth. When running in Fedora 24, I did get an upgrade prompt but decided to download Fedora 25 Workstation to do a clean install.

Setup Fedora 25 Install USB Flash Drive from within Linux

The process I used to install Fedora 25 consisted of using the Disks GUI to write the .iso file to an external USB 3.0 flash drive. The menu option for the USB flash drive (most drives really) allow you to select a disk image (a .iso file qualifies) and write that image to a physical disk. This process allows me to apply the contents of the .iso to the USB flash drive in the correct manner that will result in a bootable flash drive in which the bootloader on the USB correctly finds the Fedora 25 operating system on the USB. The disks utility can be access from Ubuntu as well. This procedure can applied to most Linux distributions.

Installing Fedora 25 Workstation from Bootup

On an HP computer, when you boot up, you press the ESC key. Next, you press the F9 key which opens a menu from which you can select the appropriate boot image (in this case, image on the USB flash drive). After you select the image, the computer loads the operating system from the USB. The Fedora OS on the USB has an option to install the OS to the computer’s internal disk drive. Replace HP with the computer of your choice and the ESC and F9 keys with those that work for the bios of your computer and this is how you install Linux on a computer.

Fedora 25 Workstation Installed

The settings menu provides a Details applet that lists the overall summary of the distribution you are running. It is similar to the System window in Microsoft Windows that shows processor, memory, and version of windows. In this case, the details applet shows the version of Fedora installed along with a summary of primary hardware.

Back to Allegro 11/23/2016

On Wednesday night, I had made some progress on the listing of text in various portions of a window I am setting up. In the previous article, I had a single line of code that looked at the line height of the text and only wrote text to the window if the text string’s dimensions fell within the graphical region to which it was being expressed. At the same time, I needed to scale the text so it had the proper proportions for a 4K resolution (and any resolution). Microsoft has a device independent pixels formula that divides the text’s desired points by 72 (a paper based measurement) and multiplies that times the screen dpi. I calculated the DPI based on a Wikipedia article and applied the results. gautierframe_20161123_a_textscaled.

That worked okay, but the last line of text would bleed over to the next regions when you resized the window. It would bleed just a tad and I wanted to clean that up. At the same time, the text ran vertically all the way to the edge of the screen including where the scroll bars would reside. The following is the result of bleeding text when resizing the screen.


Vertical Clipping

I added some code for clipping the region vertically which produced clean vertical output, but I still had bleeding of the text horizontally.


Full Region Clipping

I kept refining the process until finally, I achieved full clipping in the vertical and horizontal dimensions. The code for all this will be included in the next article on this topic.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.