Java Code Examples for java.awt.Graphics2D.fillRoundRect()

The following are Jave code examples for showing how to use fillRoundRect() of the java.awt.Graphics2D class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: rapidminer   File: TextAreaUI.java   View Source Code Vote up 8 votes
@Override
protected void paintBackground(Graphics g) {
	Graphics2D g2 = (Graphics2D) g;
	g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);

	g2.setColor(getComponent().getBackground());
	g2.fillRoundRect(0, 0, getComponent().getWidth(), getComponent().getHeight(),
			RapidLookAndFeel.CORNER_DEFAULT_RADIUS, RapidLookAndFeel.CORNER_DEFAULT_RADIUS);
}
 
Example 2
Project: Pixie   File: CustomColorButton.java   View Source Code Vote up 6 votes
/**
 * Over-painting component, so it can have different colors.
 */
@Override
public void paintComponent(Graphics g) {
    super.paintComponent(g);
    Graphics2D g2d = (Graphics2D) g;

    g2d.setPaint(bkgColor);

    // draw the button rounded opaque
    g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); // for high quality
    g2d.fillRoundRect(0, 0, getWidth(), getHeight(), 7, 7);

    // draw the border
    g2d.setColor(bkgColor.darker().darker());
    g2d.drawRoundRect(0, 0, getWidth() - 1, getHeight() - 1, 7, 7);
    super.paintComponent(g);
}
 
Example 3
Project: GIFKR   File: ViewUtils.java   View Source Code Vote up 6 votes
public static JPanel wrapMacFancy(JPanel content) {
	JPanel panel = new JPanel(new BorderLayout()) {

		private static final long serialVersionUID = 941275105778632480L;

		@Override
		public void paintComponent(Graphics g) {
			Color border = new Color(64, 64, 64, 64);
			Color bg = new Color(128, 128, 128, 64);

			Graphics2D g2 = (Graphics2D) g;
			g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
			g2.setColor(bg);
			g2.fillRoundRect(1, 1, this.getWidth()-2, this.getHeight()-2, 10, 10);
			g2.setColor(border);
			g2.drawRoundRect(0, 0, this.getWidth()-1, this.getHeight()-1, 10, 10);
		}
	};
	
	panel.setOpaque(false);
	content.setOpaque(false);
	panel.add(content, BorderLayout.CENTER);
	
	return panel;
}
 
Example 4
Project: monarch   File: LifelineState.java   View Source Code Vote up 5 votes
public void paint(Graphics2D g, StateColorMap colorMap) {
  Rectangle bounds = g.getClipBounds();
  if (startY > bounds.getMaxY() || startY + height < bounds.getMinY()) {
    return;
  }

  int x = line.getX();
  int width = line.getWidth();

  Color color = colorMap.getColor(stateName);
  g.setColor(color);
  g.fillRoundRect(x, startY, width, height, ARC_SIZE, ARC_SIZE);
  g.setColor(Color.BLACK);
}
 
Example 5
Project: DicomViewer   File: AbstractSliderComponent.java   View Source Code Vote up 5 votes
/** dessine un cursseur dont le centre en X est centerX, et le centre en Y est centerY */
protected void drawCursor(final Graphics2D g2, final Color fillColor, final Color drawColor, final int centerX, final int centerY) {
    g2.setColor(fillColor);
    g2.fillRoundRect(centerX - CURSOR_W / 2, centerY - CURSOR_H / 2, CURSOR_W, CURSOR_H, ARC_SIZE, ARC_SIZE);

    g2.setColor(drawColor);
    g2.drawRoundRect(centerX - CURSOR_W / 2, centerY - CURSOR_H / 2, CURSOR_W, CURSOR_H, ARC_SIZE, ARC_SIZE);
}
 
Example 6
Project: DicomViewer   File: AbstractSliderComponentForTimeSlider.java   View Source Code Vote up 5 votes
/** dessine un cursseur dont le centre en X est centerX, et le centre en Y est centerY */
public static void drawCursor(final Graphics2D g, final Color fillColor, final Color drawColor, final int centerX, final int centerY) {
    Graphics2D g2 = (Graphics2D) g.create();
    g2.setColor(fillColor);
    g2.fillRoundRect(centerX - CURSOR_W / 2, centerY - CURSOR_H / 2, CURSOR_W, CURSOR_H, ARC_SIZE, ARC_SIZE);

    g2.setColor(drawColor);
    g2.drawRoundRect(centerX - CURSOR_W / 2, centerY - CURSOR_H / 2, CURSOR_W, CURSOR_H, ARC_SIZE, ARC_SIZE);
    g2.dispose();
}
 
Example 7
Project: rapidminer   File: PerspectivesPanelBar.java   View Source Code Vote up 5 votes
@Override
public void paint(Graphics g, JComponent c) {
	Graphics2D g2 = (Graphics2D) g.create();
	g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
	g2.setColor(getBackgroundColor());
	Rectangle rec = contentPanel.getBounds();
	g2.fillRoundRect((int) rec.getX(), (int) rec.getY(), rec.width + 15, rec.height, 25, 25);
	g2.setColor(SwingTools.RAPIDMINER_ORANGE);
	g2.drawRoundRect((int) rec.getX(), (int) rec.getY(), rec.width + 15, rec.height - 1, 25, 25);
	g2.dispose();
	super.paint(g, c);
}
 
Example 8
Project: brModelo   File: PreTexto.java   View Source Code Vote up 5 votes
protected void PaintGradiente(Graphics2D g, boolean round) {
    int dist = 0;
    int w = getWidth() - dist;
    int h = getHeight() - dist;
    int L = getLeft();
    int T = getTop();
    boolean dv = getGDirecao() == VERTICAL;

    //Composite originalComposite = g.getComposite();
    //g.setComposite(AlphaComposite.getInstance(AlphaComposite.DST_OVER, alfa));
    GradientPaint GP = new GradientPaint(L, T, getGradienteStartColor(), dv ? L : L + w, dv ? T + h : T, getGradienteEndColor(), true);
    //g.setPaint(GP);

    g.setPaint(getForeColor());
    if (round) {
        g.drawRoundRect(L, T, w - 1, h - 1, roundRectSize, roundRectSize);
        g.setPaint(GP);
        g.fillRoundRect(L + 1, T + 1, w - 2, h - 2, roundRectSize, roundRectSize);
        g.setPaint(isDisablePainted()? disabledColor : Color.WHITE);
        g.drawRoundRect(L + 1, T + 1, w - 3, h - 3, roundRectSize, roundRectSize);
    } else {
        g.drawRect(L, T, w - 1, h - 1);
        g.setPaint(GP);
        g.fillRect(L + 1, T + 1, w - 2, h - 2);
        g.setPaint(isDisablePainted()? disabledColor : Color.WHITE);
        g.drawRect(L + 1, T + 1, w - 3, h - 3);
    }
    if (isGradientePinteDetalhe()) {
        g.setPaint(getGradienteCorDetalhe());
        GeneralPath path = new GeneralPath();
        path.moveTo(L + 2, T + 2);
        path.quadTo(L + w / 2 + 1, T + h / 2 + 1, L + w - 1, T + 2);
        path.closePath();
        g.fill(path);
    }
    //g.setComposite(originalComposite);

}
 
Example 9
Project: komodoGUI   File: PresentationPanel.java   View Source Code Vote up 5 votes
public void paintComponent(Graphics graphics) 
{
	int h = getHeight();
	int w =  getWidth();
	
	if (h < GRADIENT_EXTENT + 1) 
	{
		super.paintComponent(graphics);
		return;
	}
	
	float percentageOfGradient = (float) GRADIENT_EXTENT / h;
	
	if (percentageOfGradient > 0.49f)
	{
		percentageOfGradient = 0.49f;
	}
	
	Graphics2D graphics2D = (Graphics2D) graphics;
	
	float fractions[] = new float[] 
	{ 
		0, percentageOfGradient, 1 - percentageOfGradient, 1f 
	};
	
	Color colors[] = new Color[] 
	{ 
		colorLow, colorHigh, colorHigh, colorLow 
	};
	
	LinearGradientPaint paint = new LinearGradientPaint(0, 0, 0, h - 1, fractions, colors);
	
	graphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
	graphics2D.setPaint(paint);
	graphics2D.fillRoundRect(0, 0, w - 1, h - 1, GRADIENT_EXTENT, GRADIENT_EXTENT);
	graphics2D.setColor(colorBorder);
	graphics2D.setStroke(edgeStroke);
	graphics2D.drawRoundRect(0, 0, w - 1, h - 1, GRADIENT_EXTENT, GRADIENT_EXTENT);
}
 
Example 10
Project: VASSAL-src   File: ADC2Module.java   View Source Code Vote up 5 votes
public void drawFlagImage(Graphics2D g) {
  final int tabHeight = 15;
  final int tabWidth = 10;
  g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
  g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
  g.setColor(background);
  g.fillRoundRect(-tabWidth, 0, 2*tabWidth, tabHeight, 6, 6);
  g.setColor(foreground);
  g.drawRoundRect(-tabWidth, 0, 2*tabWidth-1, tabHeight-1, 6, 6);
  g.setFont(new Font("Dialog", Font.PLAIN, 9));
  Rectangle2D r = g.getFontMetrics().getStringBounds(name, g);
  g.drawString(name, tabWidth/2 - (int) (r.getWidth()/2.0) - 1, 11);
  g.setBackground(new Color(0,0,0,0));
  g.clearRect(-tabWidth, 0, tabWidth, tabHeight);
}
 
Example 11
Project: EasyDragDrop   File: MainFrame.java   View Source Code Vote up 5 votes
@Override
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
    Dimension arcs = new Dimension(40, 40);
    Graphics2D graphics = (Graphics2D) g;
    graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);

    graphics.setColor(new Color(106, 117, 144));
    graphics.fillRoundRect(0, 0, width - 1, height - 1, arcs.width, arcs.height);//paint background

    graphics.setClip(null);
    graphics.drawRoundRect(0, 0, width - 1, height - 1, arcs.width, arcs.height);//paint border
}
 
Example 12
Project: DicomViewer   File: AbstractSliderComponent_1.java   View Source Code Vote up 5 votes
/** dessine un cursseur dont le centre en X est centerX, et le centre en Y est centerY */
public static void drawCursor(final Graphics2D g, final Color fillColor, final Color drawColor, final int centerX, final int centerY) {
    Graphics2D g2 = (Graphics2D) g.create();
    g2.setColor(fillColor);
    g2.fillRoundRect(centerX - CURSOR_W / 2, centerY - CURSOR_H / 2, CURSOR_W, CURSOR_H, ARC_SIZE, ARC_SIZE);

    g2.setColor(drawColor);
    g2.drawRoundRect(centerX - CURSOR_W / 2, centerY - CURSOR_H / 2, CURSOR_W, CURSOR_H, ARC_SIZE, ARC_SIZE);
    g2.dispose();
}
 
Example 13
Project: faitic-checker   File: JCustomButton.java   View Source Code Vote up 5 votes
@Override
public void paint(Graphics g){

	//super.paintComponent(g);
	
	Color borderColor= !isEnabled() ? new Color(200,200,200,255) : new Color(0,110,198,255);
	Color fontColor=getForeground();
	
	int maxwidth=super.getWidth();
	int maxheight=super.getHeight();
	int marginleft=(super.getWidth()-maxwidth)/2;
	int margintop=(super.getHeight()-maxheight)/2;

	Graphics2D g2=(Graphics2D) g;
	
    g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
    g2.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
    g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);

    g2.setColor(borderColor);
    
	g2.fillRoundRect(marginleft, margintop, maxwidth, maxheight, 6, 6);
	/*
	g2.setColor(borderColor.brighter());
	g2.setStroke(new BasicStroke(2));
	g2.drawRoundRect(marginleft, margintop, maxwidth-1, maxheight-1, 6, 6);
	
	g2.setColor(borderColor.darker());
	g2.setStroke(new BasicStroke(1));
	g2.drawRoundRect(marginleft, margintop, maxwidth-1, maxheight-1, 6, 6);
	*/
	g2.setColor(fontColor);
	g2.setFont(getFont());
	g2.drawString(getText(), (getWidth()-g.getFontMetrics().stringWidth(getText()))/2, g.getFontMetrics().getAscent()+(getHeight()-g.getFontMetrics().getAscent())/2);
	
	
}
 
Example 14
Project: rapidminer   File: ProgressBarUI.java   View Source Code Vote up 4 votes
@Override
protected void paintDeterminate(Graphics g, JComponent c) {
	boolean compressed = Boolean.parseBoolean(String.valueOf(progressBar
			.getClientProperty(RapidLookTools.PROPERTY_PROGRESSBAR_COMPRESSED)));

	int y = 0;
	int x = 0;
	int w;
	int h;
	if (compressed) {
		x = (int) (c.getWidth() * 0.67);
		w = (int) (c.getWidth() * 0.33);
		y = 3;
		h = c.getHeight() - 6;
	} else {
		w = c.getWidth();
		h = c.getHeight() / 2;
	}

	int amountFull = getAmountFull(progressBar.getInsets(), w, h);

	Graphics2D g2 = (Graphics2D) g;
	g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);

	if (c.isOpaque()) {
		if (c.getParent() != null) {
			g2.setColor(c.getParent().getBackground());
		} else {
			g2.setColor(c.getBackground());
		}
		g2.fillRect(x, y, c.getWidth(), c.getHeight());
	}

	g2.setColor(Colors.PROGRESSBAR_BACKGROUND);
	g2.fillRoundRect(x + 1, y + 1, w - 2, h - 2, RapidLookAndFeel.CORNER_DEFAULT_RADIUS,
			RapidLookAndFeel.CORNER_DEFAULT_RADIUS);

	g2.setColor(Colors.PROGRESSBAR_BORDER);
	g2.drawRoundRect(x + 1, y + 1, w - 2, h - 2, RapidLookAndFeel.CORNER_DEFAULT_RADIUS,
			RapidLookAndFeel.CORNER_DEFAULT_RADIUS);

	Paint gp = new GradientPaint(x, y + 3, Colors.PROGRESSBAR_DETERMINATE_FOREGROUND_GRADIENT_START, x, h - 5,
			Colors.PROGRESSBAR_DETERMINATE_FOREGROUND_GRADIENT_END);
	g2.setPaint(gp);
	g2.fillRoundRect(x + 3, y + 3, amountFull - 5, h - 5, RapidLookAndFeel.CORNER_DEFAULT_RADIUS / 2,
			RapidLookAndFeel.CORNER_DEFAULT_RADIUS / 2);

	drawString(g2, w, h, compressed);
}
 
Example 15
Project: rapidminer   File: ProgressBarUI.java   View Source Code Vote up 4 votes
@Override
protected void paintIndeterminate(Graphics g, JComponent c) {
	boolean compressed = Boolean.parseBoolean(String.valueOf(progressBar
			.getClientProperty(RapidLookTools.PROPERTY_PROGRESSBAR_COMPRESSED)));

	int y = 0;
	int x = 0;
	int w;
	int h;
	if (compressed) {
		x = (int) (c.getWidth() * 0.67);
		w = (int) (c.getWidth() * 0.33);
		y = 3;
		h = c.getHeight() - 6;
	} else {
		w = c.getWidth();
		h = c.getHeight() / 2;
	}

	Graphics2D g2 = (Graphics2D) g;
	g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);

	if (c.isOpaque()) {
		if (c.getParent() != null) {
			g2.setColor(c.getParent().getBackground());
		} else {
			g2.setColor(c.getBackground());
		}
		g2.fillRect(x, y, c.getWidth(), c.getHeight());
	}

	g2.setColor(Colors.PROGRESSBAR_BACKGROUND);
	g2.fillRoundRect(x + 1, y + 1, w - 2, h - 2, RapidLookAndFeel.CORNER_DEFAULT_RADIUS,
			RapidLookAndFeel.CORNER_DEFAULT_RADIUS);

	g2.setColor(Colors.PROGRESSBAR_BORDER);
	g2.drawRoundRect(x + 1, y + 1, w - 2, h - 2, RapidLookAndFeel.CORNER_DEFAULT_RADIUS,
			RapidLookAndFeel.CORNER_DEFAULT_RADIUS);

	// make sure we don't draw over the boundaries
	RoundRectangle2D clipRect = new RoundRectangle2D.Double(x + 3, y + 3, w - 5, h - 5,
			RapidLookAndFeel.CORNER_DEFAULT_RADIUS / 2, RapidLookAndFeel.CORNER_DEFAULT_RADIUS / 2);
	g2.setClip(clipRect);

	for (double xCoord = x + -4 * ANIMATION_BAR_LENGTH + System.currentTimeMillis() * ANIMATION_SPEED
			% (2 * ANIMATION_BAR_LENGTH); xCoord < x + w + 2 * ANIMATION_BAR_LENGTH;) {
		g2.setColor(Colors.PROGRESSBAR_INDETERMINATE_FOREGROUND_1);
		g2.fill(createIntermediateShape(xCoord, ANIMATION_BAR_LENGTH, h));
		xCoord += ANIMATION_BAR_LENGTH;
		g2.setColor(Colors.PROGRESSBAR_INDETERMINATE_FOREGROUND_2);
		g2.fill(createIntermediateShape(xCoord, ANIMATION_BAR_LENGTH, h));
		xCoord += ANIMATION_BAR_LENGTH;
	}
	g2.setClip(null);

	drawString(g2, w, h, compressed);
}
 
Example 16
Project: faitic-checker   File: JCustomPasswordField.java   View Source Code Vote up 4 votes
@Override
public void paintComponent(Graphics g){

	Graphics2D g2=(Graphics2D) g;

	g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
	g2.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
	g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);

	g2.setColor(iBorderColor);
	g2.fillRoundRect(0, 0, getWidth(), getHeight(), 6, 6);

	g2.setColor(Color.white);
	g2.fillRoundRect(1, 1, getWidth()-2, getHeight()-2, 4, 4);

	super.paintComponent(g);

}
 
Example 17
Project: faitic-checker   File: CustomScrollBarUI.java   View Source Code Vote up 4 votes
@Override
protected void paintTrack(Graphics g, JComponent c, Rectangle trackBounds) {
	
	boolean isVertical=c.getWidth()<c.getHeight();
	
	g.setColor(back);
	g.fillRect(trackBounds.x, trackBounds.y, trackBounds.width, trackBounds.height);

	int barwidth=isVertical ? trackBounds.width/2 : trackBounds.height/2;
	
	Graphics2D g2=(Graphics2D) g;
	
 g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
 g2.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
 g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
 
	g2.setColor(forenobar);
	
	if(isVertical)
		g2.fillRoundRect(trackBounds.x+barwidth/2, trackBounds.y, barwidth, trackBounds.height, barwidth,barwidth);
	else
		g2.fillRoundRect(trackBounds.x, trackBounds.y+barwidth/2, trackBounds.width, barwidth, barwidth,barwidth);

}
 
Example 18
Project: faitic-checker   File: JCustomEditorPane.java   View Source Code Vote up 4 votes
@Override
public void paintComponent(Graphics g){
	
	Graphics2D g2=(Graphics2D) g;
	
    g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
    g2.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
    g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);

    g2.setColor(iBorderColor);
	g2.fillRoundRect(0, 0, getWidth(), getHeight(), 6, 6);
	
    g2.setColor(Color.white);
	g2.fillRoundRect(1, 1, getWidth()-2, getHeight()-2, 4, 4);
	
	super.paintComponent(g);
	
}
 
Example 19
Project: faitic-checker   File: JCustomTextField.java   View Source Code Vote up 4 votes
@Override
public void paintComponent(Graphics g){
	
	Graphics2D g2=(Graphics2D) g;
	
    g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
    g2.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
    g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);

    g2.setColor(iBorderColor);
	g2.fillRoundRect(0, 0, getWidth(), getHeight(), 6, 6);
	
    g2.setColor(Color.white);
	g2.fillRoundRect(1, 1, getWidth()-2, getHeight()-2, 4, 4);
	
	super.paintComponent(g);
	
}
 
Example 20
Project: faitic-checker   File: JSubjectCheckBox.java   View Source Code Vote up 3 votes
@Override
public void paintComponent(Graphics g){

	//super.paintComponent(g);
	
	Color borderColor=isSelected() ? new Color(0,110,198,255) : new Color(200,200,200,255);
	
	int maxside=17;
	int marginleft=super.getWidth()<super.getHeight() ? 0 : (super.getWidth()-maxside)/2;
	int margintop=super.getWidth()<super.getHeight() ? (super.getHeight()-maxside)/2 : 0;

	Graphics2D g2=(Graphics2D) g;
	
    g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
    g2.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
    g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);

    g2.setColor(borderColor);
    
	g2.fillRoundRect(marginleft, margintop, maxside+1, maxside+1, 3, 3);
	
	if(isSelected()){
		
		g2.setStroke(new BasicStroke(3));
		g2.setColor(Color.white);
		
		g2.drawLine(marginleft + 4, margintop+maxside/2, marginleft + maxside/2-1 , margintop+maxside-6);
		g2.drawLine(marginleft + maxside/2 -1, margintop+maxside-6, marginleft + maxside - 4, margintop + 6);
		
	} else{
		
		g2.setColor(Color.white);
		g2.fillRect(marginleft+2, margintop+2, maxside-4+1, maxside-4+1);
		
	}
	
}