if (type == null) {
return;
}
position.set(col * BLOCK_PIXEL_SIZE, row * BLOCK_PIXEL_SIZE);
strokeRectangle.move(position.add(STROKE_OFFSET));
surface.setStrokeStyle(new LinearGradient(
position.add(GRADIENT_POINT1_OFFSET),
position.add(GRADIENT_POINT2_OFFSET))
.addColorStop(0, KnownColor.WHITE)
.addColorStop(1, KnownColor.GRAY))
.strokeRectangle(strokeRectangle);
fillRectangle.move(position.add(FILL_OFFSET));
surface.setFillStyle(new LinearGradient(
position.add(GRADIENT_POINT1_OFFSET),
position.add(GRADIENT_POINT2_OFFSET))
.addColorStop(0, type.getColor())
.addColorStop(1, KnownColor.WHITE))
.fillRectangle(fillRectangle);