Changeset 5713e5f in mainline for uspace/lib/gui/window.c


Ignore:
Timestamp:
2014-09-01T19:17:55Z (10 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
21365c0
Parents:
a4666a9 (diff), 00ddb40 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge improvements in the graphics stack.

  • Support for drawing proportional fonts (although no actual font file included yet)
  • Implementation of bilinear filter
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/gui/window.c

    ra4666a9 r5713e5f  
    5555#include <drawctx.h>
    5656#include <surface.h>
     57#include <font/embedded.h>
    5758
    5859#include "common.h"
     
    160161        /* Window caption */
    161162       
    162         font_t font;
    163         font_init(&font, FONT_DECODER_EMBEDDED, NULL, 16);
    164        
    165         drawctx_set_font(&drawctx, &font);
     163        font_t *font;
     164        int rc = embedded_font_create(&font, 16);
     165        if (rc != EOK) {
     166                window_yield(widget->window);
     167                return;
     168        }
     169       
     170        drawctx_set_font(&drawctx, font);
    166171        source_set_color(&source, widget->window->is_focused ?
    167172            color_caption_focus : color_caption_unfocus);
     
    169174        sysarg_t cpt_width;
    170175        sysarg_t cpt_height;
    171         font_get_box(&font, widget->window->caption, &cpt_width, &cpt_height);
     176        font_get_box(font, widget->window->caption, &cpt_width, &cpt_height);
    172177       
    173178        bool draw_title =
     
    183188        }
    184189       
    185         font_release(&font);
     190        font_release(font);
    186191        window_yield(widget->window);
    187192}
Note: See TracChangeset for help on using the changeset viewer.