VapxLayoutManager.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. // Tencent is pleased to support the open source community by making vap available.
  2. //
  3. // Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved.
  4. //
  5. // Licensed under the MIT License (the "License"); you may not use this file except in
  6. // compliance with the License. You may obtain a copy of the License at
  7. //
  8. // http://opensource.org/licenses/MIT
  9. //
  10. // Unless required by applicable law or agreed to in writing, software distributed under the License is
  11. // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
  12. // either express or implied. See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. #import <Foundation/Foundation.h>
  15. #import "QGVAPConfigModel.h"
  16. @interface VapxBox : NSObject
  17. @property (nonatomic, assign) NSRect rect;
  18. @property (nonatomic, assign) BOOL used;
  19. @property (nonatomic, strong) VapxBox *down;
  20. @property (nonatomic, strong) VapxBox *right;
  21. @end
  22. @interface VapxLayoutManager : NSObject
  23. //为了消除编码算法对边界的影响,加上padding
  24. @property (nonatomic, assign) NSEdgeInsets padding;
  25. @property (nonatomic, assign) BOOL classicMode;
  26. - (NSSize)maximumSizeForInfo:(QGVAPConfigModel *)config alphaMinScale:(CGFloat)scale;
  27. - (void)layoutWith:(QGVAPConfigModel *)config desDir:(NSString *)des alphaScale:(CGFloat)scale;
  28. @end