Code Monkey home page Code Monkey logo

comic-generator's Introduction

Comic Generator ImageImage

This project allows to generate a comics and uses as base the project AguiaJ.

Panels and tiers make up a board.

How to Use

Build a Panel

Given a certain image, the panel is obtained through the Panel constructor.

/**
 * Build a new Panel.
 * @param image - Image Panel
 * @param sizeFrame - Frame size
 * @param typeFrame - Frame type
 * @param colorFrame - Frame color
 */

Panel p = new Panel(ColorImage image, int sizeFrame, int typeFrame, Color colorFrame);

Build a new Panel with frame black by default.

/**
 * Build a new Panel with black frame by default.
 * @param image - Image Panel
 * @param sizeFrame - Frame size
 * @param typeFrame - Frame type
 */

Panel pBlack = new Panel(ColorImage image, int sizeFrame, int typeFrame);

Frame Type - Information

Frame Type receives the integer value a, where a is an element of the set A = {0, 1, 2, 3}. The integer define the Frame Type.

Build a Board

Given a set of Panels it is possible to generate a Board.

/**
 * Build a Board of a CS.
 * @param strips - Number of strips
*/

Board b = new Board(int strips);

To insert a Panel in a certain position of the Board, you must indicate the position on the Board with setPanel.

void setPanel(int xPosition, int yPosition, Panel v)

Build a Board - Example

Board p = new Board(6);

// Insert panel frog on p
p.setPanel(0, 1, frog);

// Insert panel car on p
p.setPanel(1, 2, car);

Other Features

PANEL

Get Panel Height.

int getHeightPanel()

Get Panel Width

int getWidthPanel()

Get image embedded in the Panel.

ColorImage getImage()

Get frame size.

int getSizeFrame()

Get frame type.

int getTypeFrame()

Get frame color.

Color getColorFrame()

Convert image color to black and white image.

ColorImage getImageBlackAndWhite()

Get the current image state.

boolean getStateImagePanel()

Change size frame Panel.

void setSizeFrame(int size)

Change color frame Panel.

void setColorFrame(Color color)

Change type frame Panel.

setTypeFrame(int type)

Set black and white image Panel.

setBlackAndWhiteImage()

Set color image Panel.

setColorImage()

Get Panel according all specifications.

ColorImage getPanel()

BOARD

Get width of the Board according all specifications.

int getWidthBoard()

Get height of the Board according all specifications.

int getHeightBoard()

Define the number of Panels on the Board.

void setNumberOfStrips(int strips)

Define number of strips on the particular Panel.

setNumberOfPanels(int locationStrips, int numberOfPanels)

Change Panels distance.

void setDistance(int distance)

Replace a Panel image.

void setPanel(int xPosition, int yPosition, Panel v)

Modify frame size of a particular Panel.

void setPanelSizeFrame(int xPosition, int yPosition, int sizeFrame)

Modify frame color of a particular Panel.

void setColorFramePanel(int xPosition, int yPosition, Color colorFrame)

Show Panel with image black and white.

void setBlackAndWhitePanel(int xPosition, int yPosition)

Show Panel with real image color.

void setColorImagePanel(int xPosition, int yPosition)

Modify the frame type of a Panel.

void setTypePanel(int xPosition, int yPosition, int typeFrame)

Get image associated with the board.

ColorImage getBoard()

This method allows you to split a Panel and create new Panel.

setDividirPanel(int xPosition, int yPosition, int value)

Get the maximum height of a tier.

int maximumHeight(Panel[] v)

Get the maximum number of Panels on a strip or the number of Panels on a strip.

int maximumPanelsStrip(Panel[][] v, int locationLine, boolean access)

Build new Matrix

Panel[][] buildMatrix(int width, int height)

Next Steps

Build a new version without AguiaJ.

AguiaJ

More information about the AguiaJ project.

Author

comic-generator's People

Contributors

dominoesbase avatar

Stargazers

Che Mcnabb avatar Albert Lie 이영덕 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.