// Path: lib-photo-booth/src/com/groundupworks/lib/photobooth/helpers/ImageHelper.java
// public interface Arrangement {
// 
//     /**
//      * Creates a photo strip.
//      *
//      * @param srcBitmaps the array of bitmaps to join into one photo strip. The entire array must be populated with bitmaps
//      *                   of the same size, and none of the slots may be null.
//      * @return the photo strip; or null if unsuccessful.
//      */
//     public Bitmap createPhotoStrip(Bitmap[] srcBitmaps);
// }


import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import com.groundupworks.lib.photobooth.helpers.ImageHelper.Arrangement;
/*
 * This file is part of Flying PhotoBooth.
 * 
 * Flying PhotoBooth is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Flying PhotoBooth is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Flying PhotoBooth.  If not, see <http://www.gnu.org/licenses/>.
 */
package com.groundupworks.lib.photobooth.arrangements;



/**
 * Base class where other {@link Arrangement} implementations extend from.
 *
 * @author Benedict Lau
 */
public abstract class BaseArrangement implements Arrangement {

    /**
     * Photo strip panel padding.
     */
    public static final int PHOTO_STRIP_PANEL_PADDING = 50;

    //
    // Private methods.
    //

    /**
     * Gets the header bitmap for the photo strip. The base implementation returns null.
     *
     * @param width the width of the header bitmap.
     * @return a bitmap to be drawn as the photo strip header; or null if no header is applied.
     */
    protected Bitmap getHeader(int width) {
        return null;
    }

    /**
     * Draws the border for the photo strip.
     *
     * @param canvas the canvas to draw on.
     * @param left   the left side of the photo strip.
     * @param top    the top of the photo strip.
     * @param right  the right side of the photo strip.
     * @param bottom the bottom of the photo strip.
     */
    protected static void drawPhotoStripBorders(Canvas canvas, float left, float top, float right, float bottom) {
// Path: lib-photo-booth/src/com/groundupworks/lib/photobooth/helpers/ImageHelper.java
// public interface Arrangement {
// 
//     /**
//      * Creates a photo strip.
//      *
//      * @param srcBitmaps the array of bitmaps to join into one photo strip. The entire array must be populated with bitmaps
//      *                   of the same size, and none of the slots may be null.
//      * @return the photo strip; or null if unsuccessful.
//      */
//     public Bitmap createPhotoStrip(Bitmap[] srcBitmaps);
// }


// Path: lib-photo-booth/src/com/groundupworks/lib/photobooth/arrangements/BaseArrangement.java
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import com.groundupworks.lib.photobooth.helpers.ImageHelper.Arrangement;

/*
 * This file is part of Flying PhotoBooth.
 * 
 * Flying PhotoBooth is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Flying PhotoBooth is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Flying PhotoBooth.  If not, see <http://www.gnu.org/licenses/>.
 */
package com.groundupworks.lib.photobooth.arrangements;



/**
 * Base class where other {@link Arrangement} implementations extend from.
 *
 * @author Benedict Lau
 */
public abstract class BaseArrangement implements Arrangement {

    /**
     * Photo strip panel padding.
     */
    public static final int PHOTO_STRIP_PANEL_PADDING = 50;

    //
    // Private methods.
    //

    /**
     * Gets the header bitmap for the photo strip. The base implementation returns null.
     *
     * @param width the width of the header bitmap.
     * @return a bitmap to be drawn as the photo strip header; or null if no header is applied.
     */
    protected Bitmap getHeader(int width) {
        return null;
    }

    /**
     * Draws the border for the photo strip.
     *
     * @param canvas the canvas to draw on.
     * @param left   the left side of the photo strip.
     * @param top    the top of the photo strip.
     * @param right  the right side of the photo strip.
     * @param bottom the bottom of the photo strip.
     */
    protected static void drawPhotoStripBorders(Canvas canvas, float left, float top, float right, float bottom) {
        Paint paint = new Paint();