if (incremental) { size = maxTextureSize; packStrategy = new GuillotineStrategy(); } else { int maxGlyphHeight = (int)Math.ceil(data.lineHeight);
if (incremental) { size = maxTextureSize; packStrategy = new GuillotineStrategy(); } else { int maxGlyphHeight = (int)Math.ceil(data.lineHeight);
public Page pack (PixmapPacker packer, String name, Rectangle rect) { GuillotinePage page; if (packer.pages.size == 0) { // Add a page if empty. page = new GuillotinePage(packer); packer.pages.add(page); } else { // Always try to pack into the last page. page = (GuillotinePage)packer.pages.peek(); } int padding = packer.padding; rect.width += padding; rect.height += padding; Node node = insert(page.root, rect); if (node == null) { // Didn't fit, pack into a new page. page = new GuillotinePage(packer); packer.pages.add(page); node = insert(page.root, rect); } node.full = true; rect.set(node.rect.x, node.rect.y, node.rect.width - padding, node.rect.height - padding); return page; }
/** Uses {@link GuillotineStrategy}. * @see PixmapPacker#PixmapPacker(int, int, Format, int, boolean, boolean, boolean, PackStrategy) */ public PixmapPacker (int pageWidth, int pageHeight, Format pageFormat, int padding, boolean duplicateBorder) { this(pageWidth, pageHeight, pageFormat, padding, duplicateBorder, false, false, new GuillotineStrategy()); }
if (incremental) { size = maxTextureSize; packStrategy = new GuillotineStrategy(); } else { int maxGlyphHeight = (int)Math.ceil(data.lineHeight);
true, true, new PixmapPacker.GuillotineStrategy()); packer.setTransparentColor(Color.PINK); for (int count = 1; count <= 3; ++count) {
true, true, new PixmapPacker.GuillotineStrategy()); packer.setTransparentColor(Color.PINK); for (int count = 1; count <= 3; ++count) {
public Page pack (PixmapPacker packer, String name, Rectangle rect) { GuillotinePage page; if (packer.pages.size == 0) { // Add a page if empty. page = new GuillotinePage(packer); packer.pages.add(page); } else { // Always try to pack into the last page. page = (GuillotinePage)packer.pages.peek(); } int padding = packer.padding; rect.width += padding; rect.height += padding; Node node = insert(page.root, rect); if (node == null) { // Didn't fit, pack into a new page. page = new GuillotinePage(packer); packer.pages.add(page); node = insert(page.root, rect); } node.full = true; rect.set(node.rect.x, node.rect.y, node.rect.width - padding, node.rect.height - padding); return page; }
public Page pack (PixmapPacker packer, String name, Rectangle rect) { GuillotinePage page; if (packer.pages.size == 0) { // Add a page if empty. page = new GuillotinePage(packer); packer.pages.add(page); } else { // Always try to pack into the last page. page = (GuillotinePage)packer.pages.peek(); } int padding = packer.padding; rect.width += padding; rect.height += padding; Node node = insert(page.root, rect); if (node == null) { // Didn't fit, pack into a new page. page = new GuillotinePage(packer); packer.pages.add(page); node = insert(page.root, rect); } node.full = true; rect.set(node.rect.x, node.rect.y, node.rect.width - padding, node.rect.height - padding); return page; }
/** Uses {@link GuillotineStrategy}. * @see PixmapPacker#PixmapPacker(int, int, Format, int, boolean, boolean, boolean, PackStrategy) */ public PixmapPacker (int pageWidth, int pageHeight, Format pageFormat, int padding, boolean duplicateBorder) { this(pageWidth, pageHeight, pageFormat, padding, duplicateBorder, false, false, new GuillotineStrategy()); }
/** Uses {@link GuillotineStrategy}. * @see PixmapPacker#PixmapPacker(int, int, Format, int, boolean, boolean, boolean, PackStrategy) */ public PixmapPacker (int pageWidth, int pageHeight, Format pageFormat, int padding, boolean duplicateBorder) { this(pageWidth, pageHeight, pageFormat, padding, duplicateBorder, false, false, new GuillotineStrategy()); }