Previous 15994 Revisions Next

r14427 Saturday 11th February, 2012 at 16:58:43 UTC by Miodrag Milanović
Sync with MAME r15361 (nw)
can be usefull :)
[src/emu]rendlay.c rendlay.h

src/emu/rendlay.c
r14426r14427
625625   {
626626      m_type = CTYPE_TEXT;
627627      m_string = xml_get_attribute_string_with_subst(machine, compnode, "string", "");
628      m_textalign = xml_get_attribute_int_with_subst(machine, compnode, "align", 0);
628629   }
629630
630631   // dotmatrix nodes
r14426r14427
846847         break;
847848      aspect *= 0.9f;
848849   }
849   INT32 curx = bounds.min_x + (bounds.width() - width) / 2;
850850
851   // get alignment
852   INT32 curx;
853   switch (m_textalign)
854   {
855      // left
856      case 1:
857         curx = bounds.min_x;
858         break;
859
860      // right
861      case 2:
862         curx = bounds.max_x - width;
863         break;
864
865      // default to center
866      default:
867         curx = bounds.min_x + (bounds.width() - width) / 2;
868         break;
869   }
870
851871   // allocate a temporary bitmap
852872   bitmap_argb32 tempbitmap(dest.width(), dest.height());
853873
src/emu/rendlay.h
r14426r14427
152152      render_bounds      m_bounds;      // bounds of the element
153153      render_color      m_color;      // color of the element
154154      astring            m_string;      // string for text components
155      int               m_textalign;   // text alignment to box
155156      bitmap_argb32      m_bitmap;      // source bitmap for images
156157      astring            m_dirname;      // directory name of image file (for lazy loading)
157158      emu_file *         m_file;         // file object for reading image/alpha files

Previous 15994 Revisions Next


© 1998-2018 The MESS Team