if (block.attachment == IdentValue.FIXED) {
if (block.getStyle().getBackgroundAttachment() == IdentValue.FIXED) {
    public static void paint(Context c, Box block) {        // don't draw if the backgrounds are turned off        if (!Configuration.isTrue("xr.renderer.draw.backgrounds", true)) {            return;        }        int width = block.getWidth();        int height = block.getHeight();        if (block.getState() != Box.DONE) {            height += c.getCanvas().getHeight();        }        Border border = c.getCurrentStyle().getBorderWidth(c.getCtx());        if (border == null) {            return;        }        Border margin = block.getMarginWidth();        Rectangle box = new Rectangle(block.x + margin.left + border.left,                block.y + margin.top + border.top,                width - margin.left - margin.right - border.left - border.right,                height - margin.top - border.top - border.bottom - margin.bottom);        // paint the background        Color background_color = c.getCurrentStyle().getBackgroundColor();        if (background_color != null) {            // skip transparent background            if (!background_color.equals(transparent)) {                c.getGraphics().setColor(background_color);                c.getGraphics().fillRect(box.x, box.y, box.width + 1, box.height + 1);            }        }        int xoff = 0;        int yoff = 0;        if (block.attachment == IdentValue.FIXED) {            yoff = c.getCanvas().getLocation().y;            c.getGraphics().setClip(c.getCanvas().getVisibleRect());        }        if (block.background_image != null) {            int left_insets = box.x;            int top_insets = box.y;            int back_width = box.width;            int back_height = box.height;            Shape oldclip = (Shape) c.getGraphics().getClip();            Rectangle new_clip = new Rectangle(left_insets, top_insets, back_width, back_height);            c.getGraphics().clip(new_clip);            xoff += block.background_position_horizontal;            yoff -= block.background_position_vertical;            // tile the image as appropriate            // do fixed tile image            boolean horiz = false;            boolean vert = false;            if (block.repeat == IdentValue.REPEAT_X) {                horiz = true;                vert = false;            }            if (block.repeat == IdentValue.REPEAT_Y) {                horiz = false;                vert = true;            }            if (block.repeat == IdentValue.REPEAT) {                horiz = true;                vert = true;            }            tileFill(c.getGraphics(), block.background_image,                    new Rectangle(left_insets, top_insets, back_width, back_height),                    xoff, -yoff, horiz, vert);            c.getGraphics().setClip(oldclip);        }    }