| 1324 | } |
| 1325 | |
| 1326 | lay::CanvasPlane * |
| 1327 | BitmapViewObjectCanvas::plane (const lay::ViewOp &style) |
| 1328 | { |
| 1329 | std::map <lay::ViewOp, unsigned int>::iterator b = m_fg_bitmap_table.find (style); |
| 1330 | if (b == m_fg_bitmap_table.end ()) { |
| 1331 | |
| 1332 | // we need to create a new plane |
| 1333 | m_fg_bitmap_table.insert (std::make_pair (style, (unsigned int) mp_alloc_bitmaps.size ())); |
| 1334 | lay::Bitmap *bm = new lay::Bitmap (m_width, m_height, m_resolution, m_font_resolution); |
| 1335 | mp_fg_bitmaps.push_back (bm); |
| 1336 | mp_alloc_bitmaps.push_back (bm); |
| 1337 | m_fg_view_ops.push_back (style); |
| 1338 | return bm; |
| 1339 | |
| 1340 | } else { |
| 1341 | // we can recycle a current one |
| 1342 | return mp_alloc_bitmaps [b->second]; |
| 1343 | } |
| 1344 | } |
| 1345 | |
| 1346 | lay::CanvasPlane * |
| 1347 | BitmapViewObjectCanvas::plane (const std::vector<lay::ViewOp> &style) |
no test coverage detected