Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

BasicBrush.java 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /* ====================================================================
  2. Licensed to the Apache Software Foundation (ASF) under one or more
  3. contributor license agreements. See the NOTICE file distributed with
  4. this work for additional information regarding copyright ownership.
  5. The ASF licenses this file to You under the Apache License, Version 2.0
  6. (the "License"); you may not use this file except in compliance with
  7. the License. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. See the License for the specific language governing permissions and
  13. limitations under the License.
  14. ==================================================================== */
  15. package org.apache.poi.hssf.view.brush;
  16. import java.awt.*;
  17. /**
  18. * This is a basic brush that just draws the line with the given parameters.
  19. * This is a {@link BasicStroke} object that can be used as a {@link Brush}.
  20. *
  21. * @author Ken Arnold, Industrious Media LLC
  22. * @see BasicStroke
  23. */
  24. public class BasicBrush extends BasicStroke implements Brush {
  25. /**
  26. * Creates a new basic brush with the given width. Invokes {@link
  27. * BasicStroke#BasicStroke(float)}
  28. *
  29. * @param width The brush width.
  30. *
  31. * @see BasicStroke#BasicStroke(float)
  32. */
  33. public BasicBrush(float width) {
  34. super(width);
  35. }
  36. /**
  37. * Creates a new basic brush with the given width, cap, and join. Invokes
  38. * {@link BasicStroke#BasicStroke(float,int,int)}
  39. *
  40. * @param width The brush width.
  41. * @param cap The capping style.
  42. * @param join The join style.
  43. *
  44. * @see BasicStroke#BasicStroke(float, int, int)
  45. */
  46. public BasicBrush(float width, int cap, int join) {
  47. super(width, cap, join);
  48. }
  49. /**
  50. * Creates a new basic brush with the given parameters. Invokes {@link
  51. * BasicStroke#BasicStroke(float,int,int,float,float[],float)} with a miter
  52. * limit of 11 (the normal default value).
  53. *
  54. * @param width The brush width.
  55. * @param cap The capping style.
  56. * @param join The join style.
  57. * @param dashes The dash intervals.
  58. * @param dashPos The intial dash position in the dash intervals.
  59. *
  60. * @see BasicStroke#BasicStroke(float, int, int, float, float[], float)
  61. */
  62. public BasicBrush(float width, int cap, int join, float[] dashes,
  63. int dashPos) {
  64. super(width, cap, join, 11.0f, dashes, dashPos);
  65. }
  66. }