QGVAPMaskInfo.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // QGVAPMaskInfo.h
  2. // Tencent is pleased to support the open source community by making vap available.
  3. //
  4. // Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved.
  5. //
  6. // Licensed under the MIT License (the "License"); you may not use this file except in
  7. // compliance with the License. You may obtain a copy of the License at
  8. //
  9. // http://opensource.org/licenses/MIT
  10. //
  11. // Unless required by applicable law or agreed to in writing, software distributed under the License is
  12. // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
  13. // either express or implied. See the License for the specific language governing permissions and
  14. // limitations under the License.
  15. #import <Foundation/Foundation.h>
  16. #import <UIKit/UIKit.h>
  17. #import <Metal/Metal.h>
  18. typedef NSUInteger QGVAPMaskValues;
  19. NS_ASSUME_NONNULL_BEGIN
  20. // 如果要更新data、rect、size必须重新创建QGVAPMaskInfo对象
  21. @interface QGVAPMaskInfo : NSObject
  22. /** mask数据 0/1 Byte */
  23. @property (nonatomic, strong) NSData *data;
  24. /** 采样范围 与datasize单位一致 */
  25. @property (nonatomic, assign) CGRect sampleRect;
  26. /** mask 大小 单位pixel */
  27. @property (nonatomic, assign) CGSize dataSize;
  28. /** 模糊范围,单位pixel */
  29. @property (nonatomic, assign) NSInteger blurLength;
  30. /** mask纹理 */
  31. @property (nonatomic, strong, readonly) id<MTLTexture> texture;
  32. @end
  33. NS_ASSUME_NONNULL_END