You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

HwmfHatchStyle.java 2.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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.hwmf.record;
  16. /**
  17. * The HatchStyle Enumeration specifies the hatch pattern.
  18. */
  19. public enum HwmfHatchStyle {
  20. /** ----- - A horizontal hatch */
  21. HS_HORIZONTAL(0x0000),
  22. /** ||||| - A vertical hatch */
  23. HS_VERTICAL(0x0001),
  24. /** \\\\\ - A 45-degree downward, left-to-right hatch. */
  25. HS_FDIAGONAL(0x0002),
  26. /** ///// - A 45-degree upward, left-to-right hatch. */
  27. HS_BDIAGONAL(0x0003),
  28. /** +++++ - A horizontal and vertical cross-hatch. */
  29. HS_CROSS(0x0004),
  30. /** xxxxx - A 45-degree crosshatch. */
  31. HS_DIAGCROSS(0x0005),
  32. /** The hatch is not a pattern, but is a solid color. */
  33. HS_SOLIDCLR(0x0006),
  34. /** The hatch is not a pattern, but is a dithered color. */
  35. HS_DITHEREDCLR(0x0007),
  36. /** The hatch is not a pattern, but is a solid color, defined by the current text (foreground) color. */
  37. HS_SOLIDTEXTCLR(0x0008),
  38. /** The hatch is not a pattern, but is a dithered color, defined by the current text (foreground) color. */
  39. HS_DITHEREDTEXTCLR(0x0009),
  40. /** The hatch is not a pattern, but is a solid color, defined by the current background color. */
  41. HS_SOLIDBKCLR(0x000A),
  42. /** The hatch is not a pattern, but is a dithered color, defined by the current background color. */
  43. HS_DITHEREDBKCLR(0x000B)
  44. ;
  45. int flag;
  46. HwmfHatchStyle(int flag) {
  47. this.flag = flag;
  48. }
  49. public static HwmfHatchStyle valueOf(int flag) {
  50. for (HwmfHatchStyle hs : values()) {
  51. if (hs.flag == flag) return hs;
  52. }
  53. return null;
  54. }
  55. }