Skip to content
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

feat: Tldraw v2: presentation area video file #49

Merged
merged 25 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
2f39e1c
bbb-presentation-video for Tldraw v2
danielpetri1 Jan 19, 2024
d3b25e3
Remove duplicate files from squash
danielpetri1 Mar 6, 2024
3cc81ae
Add frame shape
danielpetri1 Mar 27, 2024
32d3249
Run isort
danielpetri1 Apr 2, 2024
7a33b08
Update copyright/license year to 2024
danielpetri1 Apr 3, 2024
c3d4515
Sort PropsData and StyleData alphabetically
danielpetri1 Apr 8, 2024
daa67c5
Delete .uuid file
danielpetri1 Apr 8, 2024
a8708c1
Fix typo in the year
danielpetri1 Apr 8, 2024
d6c5b79
Revert insert to inset
danielpetri1 Apr 8, 2024
3ea542b
Set index to Union[str, float]
danielpetri1 Apr 15, 2024
364dfb3
Use if instead of elif
danielpetri1 Apr 15, 2024
fe27a0e
Remove unecessary children attribute
danielpetri1 Apr 15, 2024
5b281b4
Frame shape title
danielpetri1 Apr 15, 2024
b046281
Don't use multiple inheritance
danielpetri1 Apr 16, 2024
2841de2
Avoid using 'not' in arrow shape parsing logic
danielpetri1 Apr 16, 2024
6385c20
Pattern fill background color as a constant
danielpetri1 Apr 16, 2024
7a2e05c
Remove font size from font type
danielpetri1 Apr 16, 2024
7a557f5
Fix disappearing shapes
danielpetri1 Apr 16, 2024
d2f9163
More consistent naming
danielpetri1 Apr 17, 2024
a55812d
Document properties that are inherited from superclasses
danielpetri1 Apr 17, 2024
b5361a3
Delete duplicate arrow code
danielpetri1 Apr 17, 2024
43e3045
Delete duplicate arrow code
danielpetri1 Apr 17, 2024
28a5307
Add GeoShapeProto
danielpetri1 Apr 17, 2024
f195461
Fix mypy CI error
danielpetri1 Jun 8, 2024
52c70e6
Rework tldraw text v2 to use proper outline instead of multiple shadows
kepstin Jun 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2022 Calvin Walton
# SPDX-FileCopyrightText: 2024 Calvin Walton
#
# SPDX-License-Identifier: CC0-1.0

Expand Down
2 changes: 1 addition & 1 deletion .reuse/dep5
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ Upstream-Contact: Calvin Walton <calvin.walton@blindsidenetworks.com>
Source: https://github.com/blindsidenetworks/bbb-presentation-video

Files: debian/*
Copyright: 2022 Calvin Walton
Copyright: 2024 Calvin Walton
License: MIT
2 changes: 1 addition & 1 deletion bbb_presentation_video/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2022 BigBlueButton Inc. and by respective authors
# SPDX-FileCopyrightText: 2024 BigBlueButton Inc. and by respective authors
#
# SPDX-License-Identifier: GPL-3.0-or-later

Expand Down
4 changes: 2 additions & 2 deletions bbb_presentation_video/bindings/fontconfig.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2022 BigBlueButton Inc. and by respective authors
# SPDX-FileCopyrightText: 2024 BigBlueButton Inc. and by respective authors
#
# SPDX-License-Identifier: GPL-3.0-or-later

Expand All @@ -15,7 +15,7 @@ class FontconfigError(Exception):


def _FcBool_errcheck(
result: Optional[Type[ctypes._CData]],
result: Optional[ctypes._CData],
_func: Any,
_arguments: Any,
) -> Any:
Expand Down
2 changes: 1 addition & 1 deletion bbb_presentation_video/events/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2022 BigBlueButton Inc. and by respective authors
# SPDX-FileCopyrightText: 2024 BigBlueButton Inc. and by respective authors
#
# SPDX-License-Identifier: GPL-3.0-or-later

Expand Down
2 changes: 1 addition & 1 deletion bbb_presentation_video/events/errors.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2022 BigBlueButton Inc. and by respective authors
# SPDX-FileCopyrightText: 2024 BigBlueButton Inc. and by respective authors
#
# SPDX-License-Identifier: GPL-3.0-or-later

Expand Down
2 changes: 1 addition & 1 deletion bbb_presentation_video/events/helpers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2022 BigBlueButton Inc. and by respective authors
# SPDX-FileCopyrightText: 2024 BigBlueButton Inc. and by respective authors
#
# SPDX-License-Identifier: GPL-3.0-or-later

Expand Down
48 changes: 43 additions & 5 deletions bbb_presentation_video/events/tldraw.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# SPDX-FileCopyrightText: 2022 BigBlueButton Inc. and by respective authors
# SPDX-FileCopyrightText: 2024 BigBlueButton Inc. and by respective authors
#
# SPDX-License-Identifier: GPL-3.0-or-later

import json
from typing import Dict, List, Optional, TypedDict
from typing import Any, Collection, Dict, List, Optional, Sequence, TypedDict, Union

from lxml import etree

Expand All @@ -13,19 +13,47 @@
class StyleData(TypedDict, total=False):
color: str
dash: str
fill: str
font: str
isClosed: bool
isComplete: bool
isFilled: bool
opacity: float
scale: float
segments: List[Dict[str, Sequence[Collection[str]]]]
size: str
textAlign: str


class HandleData(TypedDict, total=False):
bindingId: str
canBind: bool
canSnap: bool
id: str
index: float
index: Union[float, str]
point: List[float]
canBind: bool
bindingId: str
type: str
x: float
y: float


class PropsData(StyleData, total=False):
align: str
arrowheadEnd: str
arrowheadStart: str
bend: float
end: HandleData
geo: str
growY: float
h: float
handles: Dict[str, HandleData]
isPen: bool
name: str
spline: str
start: HandleData
text: str
verticalAlign: str
w: float


class ShapeData(TypedDict, total=False):
Expand All @@ -34,20 +62,30 @@ class ShapeData(TypedDict, total=False):
decorations: Dict[str, Optional[str]]
handles: Dict[str, HandleData]
id: str
index: Union[float, str]
isComplete: bool
isLocked: bool
isModerator: bool
label: str
labelPoint: List[float]
meta: Dict[str, str]
name: str
opacity: float
parentId: str
point: List[float]
points: List[List[float]]
props: PropsData
radius: List[float]
rotation: float
size: List[float]
style: StyleData
text: str
type: str
typeName: str
userId: str
x: float
y: float
children: List[Any]


class AddShapeEvent(TypedDict):
Expand Down
6 changes: 4 additions & 2 deletions bbb_presentation_video/renderer/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2022 BigBlueButton Inc. and by respective authors
# SPDX-FileCopyrightText: 2024 BigBlueButton Inc. and by respective authors
#
# SPDX-License-Identifier: GPL-3.0-or-later

Expand Down Expand Up @@ -213,7 +213,9 @@ def render(self) -> None:
bbb_version=self.events.bbb_version,
)
shapes = ShapesRenderer(self.ctx, presentation.transform)
tldraw = TldrawRenderer(self.ctx, presentation.transform)
tldraw = TldrawRenderer(
self.ctx, presentation.transform, self.events.bbb_version
)

encoder = Encoder(
self.output, self.width, self.height, self.framerate, self.codec
Expand Down
2 changes: 1 addition & 1 deletion bbb_presentation_video/renderer/cursor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2022 BigBlueButton Inc. and by respective authors
# SPDX-FileCopyrightText: 2024 BigBlueButton Inc. and by respective authors
#
# SPDX-License-Identifier: GPL-3.0-or-later

Expand Down
10 changes: 6 additions & 4 deletions bbb_presentation_video/renderer/presentation.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2022 BigBlueButton Inc. and by respective authors
# SPDX-FileCopyrightText: 2024 BigBlueButton Inc. and by respective authors
#
# SPDX-License-Identifier: GPL-3.0-or-later
from __future__ import annotations
Expand Down Expand Up @@ -167,9 +167,11 @@ def __init__(
size=self.size,
pos=Position(-0.0, -0.0),
shapes_scale=1.0,
shapes_size=self.tldraw_drawing_size
if self.tldraw_whiteboard
else Size(DRAWING_SIZE, DRAWING_SIZE),
shapes_size=(
self.tldraw_drawing_size
if self.tldraw_whiteboard
else Size(DRAWING_SIZE, DRAWING_SIZE)
),
)

@property
Expand Down
Loading
Loading