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.