ARTNode.h 835 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. #import <React/UIView+React.h>
  8. /**
  9. * ART nodes are implemented as empty UIViews but this is just an implementation detail to fit
  10. * into the existing view management. They should also be shadow views and painted on a background
  11. * thread.
  12. */
  13. @interface ARTNode : UIView
  14. @property (nonatomic, assign) CGFloat opacity;
  15. - (void)invalidate;
  16. - (void)renderTo:(CGContextRef)context;
  17. /**
  18. * renderTo will take opacity into account and draw renderLayerTo off-screen if there is opacity
  19. * specified, then composite that onto the context. renderLayerTo always draws at opacity=1.
  20. * @abstract
  21. */
  22. - (void)renderLayerTo:(CGContextRef)context;
  23. @end