-
Notifications
You must be signed in to change notification settings - Fork 742
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
skia
RichTextBlock paragraph implementation
#14878
Draft
limeniye
wants to merge
12
commits into
unoplatform:master
Choose a base branch
from
limeniye:feat/richtextblock/skia-paragraph
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
skia
RichTextBlock paragraph implementation
#14878
limeniye
wants to merge
12
commits into
unoplatform:master
from
limeniye:feat/richtextblock/skia-paragraph
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is necessary for the following reasons: - The IBlock interface differs from the IBlock implementation of the Block type: it has redundant properties and the absence of some that are present in the original IBlock implementation; - IBlock performs a different functionality and its name confuses with the name of the Block type implementation; - The ISegmentsElement type also has two new methods. They are needed because the RichTextBlock element, apart from the text, also has an InlineUIContainer type that is not related to the text in any way.
…llection type. This change is needed to give BlockCollection the ability to draw blocks.
…s: TextWrapping, TextAlignment, Foreground, LineStackingStrategy, LineHeight, MaxLines, HorizontalTextAlignment
github-actions
bot
added
area/skia ✏️
Categorizes an issue or PR as relevant to Skia
area/automation
Categorizes an issue or PR as relevant to project automation
labels
Dec 19, 2023
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-14878/index.html |
…ping, TextAlignment, Foreground, LineStackingStrategy, LineHeight, MaxLines, HorizontalTextAlignment
github-actions
bot
added
the
platform/wasm 🌐
Categorizes an issue or PR as relevant to the WebAssembly platform
label
Dec 20, 2023
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-14878/index.html |
Latest preview Preview.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/automation
Categorizes an issue or PR as relevant to project automation
area/skia ✏️
Categorizes an issue or PR as relevant to Skia
platform/wasm 🌐
Categorizes an issue or PR as relevant to the WebAssembly platform
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
GitHub Issue: #81
PR Status
Still under development.
The goal of PR
Implementation of Paragraph functionality for RichTextBlock.
Changelog
IBlock
interface has been replaced to ISegmentsElement.
This is necessary for the following reasons:
ISegmentsElement
implements the previous function of the IBlock interface and also has 2 additional methods: InvalidateElement and InvalidateSegments. These methods are analogous to the InvalidateInlines(bool updateText) method.
But since RichTextBlock contains a collection of Bloks, not Inlines, the name of this method has been generalized for both types.
Since the RichTextBlock type, in addition to text, also has an InlineUIContainer child element, the updateText parameter was removed, and the method was split into two methods.
ISegmentsElement type is needed in order not to write "RichTextBlock or TextBlock" condition every time.
SegmentsCollection
is only needed to generalize InlineCollection and BlockCollection.
The only change I added to it is to check if the element is a Paragraph for the GetPreorderTree method.
Still under development
Problems
Unfortunately, I did not understand how to add the default RichTextBlock style to the project.
I see it as follows:
But in the project I found only styles with x:Key specified.
Latest preview
Preview.mp4
Platforms