source: svn/newcon3bcm2_21bu/dst/dmw/src/grp/jungle_font/_utfBitmapLCD.cxx

Last change on this file was 76, checked in by megakiss, 10 years ago

1W 대기전력을 만족시키기 위하여 POWEROFF시 튜너를 Standby 상태로 함

  • Property svn:executable set to *
File size: 2.6 KB
Line 
1#ifndef _INCLUDED_BITMAP_LCD
2#define _INCLUDED_BITMAP_LCD
3
4UT_STATIC_API void ut_CopyLCD(UT_IMAGE* image, UT_DATA* data)
5{
6        int x, y, xx, yy;
7//      int s_bSize = ut_BSIZE8(image->bbox.sy);
8    int ox = data->bbox.ox - image->bbox.ox;
9    int oy = data->bbox.oy - image->bbox.oy;
10    unsigned char* s = data->p.u8;
11    unsigned char* d = image->data;
12        UT_TRACE1("ut_CopyLCD()");
13        UT_TRACE_TAB_INC();
14    for (x=0,xx=ox; x<data->bbox.sx; x++,xx++)
15    {
16                for (y=0,yy=oy; y<data->bbox.sy; y++,yy++)
17        {
18                        if (s[(y>>3)*data->bbox.sx+x] & (1 << (y&7)))
19                                d[(yy>>3)*image->bbox.sx+xx] |= 1 << (yy&7);
20                }
21        }
22        UT_TRACE_TAB_DEC();
23}
24
25UT_STATIC_API UT_BOOL ut_PrepareRasterBitmapGlyphLCD(UT_FC* fc, UT_IMAGE* image)
26{
27        UT_TRACE1("ut_PrepareRasterBitmapGlyphLCD()");
28        UT_TRACE_TAB_INC();
29        image->type = _UT_IMAGE_TYPE_LCD;
30        if (fc->task->glyph->count == 1)
31        {
32                UT_TRACE1("if (fc->task->glyph->count == 1)");
33                ut_PrepareRasterBitmapHasFixedBbox(fc, image, ut_BSIZE8(fc->task->glyph->data->bbox.sy), fc->task->glyph->data->bbox.sx);
34        }
35        else if (fc->task->glyph->cmap->glyphBBoxType == _UT_GLYPH_BBOX_FIXED)
36        {
37                UT_TRACE1("if (fc->task->glyph->cmap->glyphBBoxType == _UT_GLYPH_BBOX_FIXED)");
38                ut_PrepareRasterBitmapHasFixedBbox(fc, image, ut_BSIZE8(fc->task->glyph->data->bbox.sy), fc->task->glyph->data->bbox.sx);
39        }
40        else
41        {
42                UT_TRACE1("else");
43                ut_GetImageBbox(fc, image);
44                image->bSize = ut_BSIZE8(image->bbox.sy);
45                image->lSize = image->bSize * image->bbox.sx;
46        }
47        UT_TRACE2("image->bbox.ox = %d", image->bbox.ox);
48        UT_TRACE2("image->bbox.oy = %d", image->bbox.oy);
49        UT_TRACE2("image->bbox.sx = %d", image->bbox.sx);
50        UT_TRACE2("image->bbox.sy = %d", image->bbox.sy);
51        UT_TRACE2("image->bSize   = %d", image->bSize);
52        UT_TRACE2("image->lSize   = %d", image->lSize);
53        UT_TRACE_TAB_DEC();
54        return _UT_TRUE;
55}
56
57UT_STATIC_API UT_BOOL ut_MakeRasterBitmapGlyphLCD(UT_FC* fc, UT_IMAGE* image)
58{
59        UT_TRACE1("ut_MakeRasterBitmapGlyphLCD()");
60        UT_TRACE_TAB_INC();
61        if (fc->task->glyph->count == 1)
62        {
63                UT_TRACE1("if (fc->task->glyph->count == 1)");
64                ut_MakeRasterBitmapHasOneGlyph(fc, image);
65        }
66        else if (fc->task->glyph->cmap->glyphBBoxType == _UT_GLYPH_BBOX_FIXED)
67        {
68                UT_TRACE1("if (fc->task->glyph->cmap->glyphBBoxType == _UT_GLYPH_BBOX_FIXED)");
69                ut_MakeRasterBitmapHasFixedBbox(fc, image);
70        }
71        else
72        {
73                int i = fc->task->glyph->count;
74                UT_DATA* data = fc->task->glyph->data;
75                UT_TRACE1("else");
76                ut_AllocScanBuffer(fc->task, image, 0);
77                UT_MEMSET(image->data, 0, image->lSize);
78                for (; i; i--,data++) ut_CopyLCD(image, data);
79        }
80        UT_TRACE_TAB_DEC();
81        return _UT_TRUE;
82}
83
84#endif /*#ifndef _INCLUDED_BITMAP_LCD*/
Note: See TracBrowser for help on using the repository browser.