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.

HwmfRegionMode.java 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. import org.apache.poi.hemf.record.emf.HemfFill;
  17. public enum HwmfRegionMode {
  18. /**
  19. * The new clipping region includes the intersection (overlapping areas)
  20. * of the current clipping region and the current path (or new region).
  21. */
  22. RGN_AND(0x01),
  23. /**
  24. * The new clipping region includes the union (combined areas)
  25. * of the current clipping region and the current path (or new region).
  26. */
  27. RGN_OR(0x02),
  28. /**
  29. * The new clipping region includes the union of the current clipping region
  30. * and the current path (or new region) but without the overlapping areas
  31. */
  32. RGN_XOR(0x03),
  33. /**
  34. * The new clipping region includes the areas of the current clipping region
  35. * with those of the current path (or new region) excluded.
  36. */
  37. RGN_DIFF(0x04),
  38. /**
  39. * The new clipping region is the current path (or the new region).
  40. */
  41. RGN_COPY(0x05);
  42. int flag;
  43. HwmfRegionMode(int flag) {
  44. this.flag = flag;
  45. }
  46. public static HwmfRegionMode valueOf(int flag) {
  47. for (HwmfRegionMode rm : values()) {
  48. if (rm.flag == flag) return rm;
  49. }
  50. return null;
  51. }
  52. }