mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
moved baseline alignment to a layout spec.
This commit is contained in:
26
AsyncDisplayKit/Private/ASStackTextPositionedLayout.h
Normal file
26
AsyncDisplayKit/Private/ASStackTextPositionedLayout.h
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*
|
||||
*/
|
||||
|
||||
#import "ASLayout.h"
|
||||
#import "ASDimension.h"
|
||||
#import "ASStackTextLayoutSpec.h"
|
||||
#import "ASStackPositionedLayout.h"
|
||||
|
||||
struct ASStackTextPositionedLayout {
|
||||
const std::vector<ASLayout *> sublayouts;
|
||||
const CGFloat crossSize;
|
||||
const CGFloat ascender;
|
||||
const CGFloat descender;
|
||||
|
||||
/** Given a positioned layout, computes each child position using baseline alignment. */
|
||||
static ASStackTextPositionedLayout compute(const ASStackPositionedLayout &positionedLayout,
|
||||
const ASStackTextLayoutSpecStyle &textStyle,
|
||||
const ASSizeRange &constrainedSize);
|
||||
};
|
||||
Reference in New Issue
Block a user