Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion .github/workflows/build_svg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ jobs:

- name: Lint Podspec File
run: |
POD_VERSION=0.0.1-for-ci-test SERVAL_KIT_VERSION=${{ github.event.pull_request.head.sha }} bundle exec pod spec lint svg/ServalSVG.podspec --verbose --skip-import-validation --allow-warnings
pushd svg
POD_VERSION=0.0.1-for-ci-test SERVAL_KIT_VERSION=${{ github.event.pull_request.head.sha }} BUNDLE_GEMFILE=../Gemfile bundle exec pod lib lint ServalSVG.podspec --verbose --skip-import-validation --allow-warnings
popd

build-harmony:
name: Build HarmonyOS
Expand Down
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,11 @@ build
.vscode
check_style.xml
.cache

# User specific files
.DS_Store
xcuserdata/

# CXX build
.cxx/

2 changes: 2 additions & 0 deletions svg/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ source_set("serval-svg") {
"include/element/SrSVGImage.h",
"include/element/SrSVGLine.h",
"include/element/SrSVGLinearGradient.h",
"include/element/SrSVGMask.h",
"include/element/SrSVGNode.h",
"include/element/SrSVGPath.h",
"include/element/SrSVGPolyLine.h",
Expand Down Expand Up @@ -57,6 +58,7 @@ source_set("serval-svg") {
"src/element/SrSVGImage.cc",
"src/element/SrSVGLine.cc",
"src/element/SrSVGLinearGradient.cc",
"src/element/SrSVGMask.cc",
"src/element/SrSVGNode.cc",
"src/element/SrSVGPath.cc",
"src/element/SrSVGPolyLine.cc",
Expand Down
1 change: 1 addition & 0 deletions svg/SERVAL_KIT_VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.0.1
134 changes: 15 additions & 119 deletions svg/ServalSVG.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,16 @@
Pod::Spec.new do |s|
s.name = 'ServalSVG'
s.version = begin
raw_version = ENV['POD_VERSION'] || File.read('SERVAL_KIT_VERSION').strip
version_path = File.expand_path('SERVAL_KIT_VERSION', __dir__)
raw_version = ENV['POD_VERSION'] || File.read(version_path).strip
raw_version
end
s.summary = 'A library for parsing and rendering SVG documents'
s.homepage = 'https://github.com/lynx-family/serval-kit'

# Replace with the path to your library source directory
s.source = { :git => 'https://github.com/lynx-family/serval-kit.git', }.tap do |source_hash|
source_hash[:commit] = ENV['SERVAL_KIT_COMMIT_ID']
end
# Replace with the path to your library header files
# s.ios.public_header_files = 'path/to/headers/**/*.h'
end

s.license = { :type => 'Apache 2.0' }

Expand All @@ -22,117 +20,17 @@ end
# s.platform = :ios, '12.0'
s.ios.deployment_target = "9.0"

s.public_header_files = "svg/include/platform/iOS/SrSVG.h",
"svg/include/platform/iOS/SrSVGView.h"
s.public_header_files = "include/platform/iOS/SrSVG.h",
"include/platform/iOS/SrSVGView.h"

s.private_header_files = # element
"svg/include/element/SrSVGCircle.h",
"svg/include/element/SrSVGClipPath.h",
"svg/include/element/SrSVGContainer.h",
"svg/include/element/SrSVGDefs.h",
"svg/include/element/SrSVGEllipse.h",
"svg/include/element/SrSVGG.h",
"svg/include/element/SrSVGImage.h",
"svg/include/element/SrSVGLine.h",
"svg/include/element/SrSVGLinearGradient.h",
"svg/include/element/SrSVGNode.h",
"svg/include/element/SrSVGPath.h",
"svg/include/element/SrSVGPolyLine.h",
"svg/include/element/SrSVGPolygon.h",
"svg/include/element/SrSVGRadialGradient.h",
"svg/include/element/SrSVGRect.h",
"svg/include/element/SrSVGSVG.h",
"svg/include/element/SrSVGShape.h",
"svg/include/element/SrSVGStop.h",
"svg/include/element/SrSVGText.h",
"svg/include/element/SrSVGTypes.h",
"svg/include/element/SrSVGUse.h",
# parser
"svg/include/parser/SrDOM.h",
"svg/include/parser/SrDOMParser.h",
"svg/include/parser/SrSVGDOM.h",
"svg/include/parser/SrXMLExtractor.h",
"svg/include/parser/SrXMLParser.h",
"svg/include/parser/SrXMLParserError.h",
# canvas
"svg/include/canvas/SrCanvas.h",
"svg/include/canvas/SrParagraph.h",
"svg/include/platform/iOS/SrIOSCanvas.h",
"svg/include/platform/iOS/SrIOSParagraph.h",
# include
"svg/include/utils/SrFloatComparison.h",
"svg/include/utils/SrSVGLog.h"

s.source_files = # element
"svg/include/element/SrSVGCircle.h",
"svg/include/element/SrSVGClipPath.h",
"svg/include/element/SrSVGContainer.h",
"svg/include/element/SrSVGDefs.h",
"svg/include/element/SrSVGEllipse.h",
"svg/include/element/SrSVGG.h",
"svg/include/element/SrSVGImage.h",
"svg/include/element/SrSVGLine.h",
"svg/include/element/SrSVGLinearGradient.h",
"svg/include/element/SrSVGNode.h",
"svg/include/element/SrSVGPath.h",
"svg/include/element/SrSVGPolyLine.h",
"svg/include/element/SrSVGPolygon.h",
"svg/include/element/SrSVGRadialGradient.h",
"svg/include/element/SrSVGRect.h",
"svg/include/element/SrSVGSVG.h",
"svg/include/element/SrSVGShape.h",
"svg/include/element/SrSVGTypes.h",
"svg/include/element/SrSVGUse.h",
"svg/include/element/SrSVGStop.h",
"svg/include/element/SrSVGText.h",
"svg/src/element/SrSVGCircle.cc",
"svg/src/element/SrSVGClipPath.cc",
"svg/src/element/SrSVGContainer.cc",
"svg/src/element/SrSVGDefs.cc",
"svg/src/element/SrSVGEllipse.cc",
"svg/src/element/SrSVGImage.cc",
"svg/src/element/SrSVGLine.cc",
"svg/src/element/SrSVGLinearGradient.cc",
"svg/src/element/SrSVGNode.cc",
"svg/src/element/SrSVGPath.cc",
"svg/src/element/SrSVGPolyLine.cc",
"svg/src/element/SrSVGPolygon.cc",
"svg/src/element/SrSVGRadialGradient.cc",
"svg/src/element/SrSVGRect.cc",
"svg/src/element/SrSVGSVG.cc",
"svg/src/element/SrSVGShape.cc",
"svg/src/element/SrSVGStop.cc",
"svg/src/element/SrSVGText.cc",
"svg/src/element/SrSVGTypes.c",
"svg/src/element/SrSVGUse.cc",
# parser
"svg/include/parser/SrDOM.h",
"svg/include/parser/SrDOMParser.h",
"svg/include/parser/SrSVGDOM.h",
"svg/include/parser/SrXMLExtractor.h",
"svg/include/parser/SrXMLParser.h",
"svg/include/parser/SrXMLParserError.h",
"svg/src/parser/SrDOM.cc",
"svg/src/parser/SrDOMParser.cc",
"svg/src/parser/SrSVGDOM.cc",
"svg/src/parser/SrXMLExtractor.c",
"svg/src/parser/SrXMLParser.cc",
"svg/src/parser/SrXMLParserError.cc",
# canvas
"svg/include/platform/iOS/SrSVG.h",
"svg/include/platform/iOS/SrSVGView.h",
"svg/include/platform/iOS/SrIOSCanvas.h",
"svg/include/platform/iOS/SrIOSParagraph.h",
"svg/include/canvas/SrCanvas.h",
"svg/include/canvas/SrParagraph.h",
"svg/platform/iOS/SrIOSCanvas.mm",
"svg/platform/iOS/SrSVG.mm",
"svg/platform/iOS/SrSVGView.mm",
"svg/platform/iOS/SrIOSParagraph.mm",
# cpp
"svg/include/utils/SrFloatComparison.h",
"svg/include/utils/SrSVGLog.h",
"svg/platform/iOS/SrLogDarwin.mm"
s.source_files = "include/element/**/*.h",
"include/parser/**/*.h",
"include/canvas/**/*.h",
"include/platform/iOS/**/*.h",
"include/utils/**/*.h",
"src/element/**/*.{c,cc,cpp}",
"src/parser/**/*.{c,cc,cpp}",
"platform/iOS/**/*.{mm,m,cc,cpp,c}"

# s.exclude_files = "src/canvas/android/*.h",
# "src/canvas/android/*.cc",
Expand All @@ -154,13 +52,11 @@ end
'CLANG_CXX_LIBRARY' => 'libc++',
'CLANG_ENABLE_MODULES' => 'YES',
'CLANG_ENABLE_OBJC_ARC' => 'YES',
'HEADER_SEARCH_PATHS' => '$(inherited) "$(PODS_TARGET_SRCROOT)/include"',
'GCC_C_LANGUAGE_STANDARD' => 'c11'
}

s.xcconfig = {
"USER_HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/svg/include/**\"",
"OTHER_CPLUSPLUSFLAGS" => "-std=c++17 -stdlib=libc++"
}
s.xcconfig = { "OTHER_CPLUSPLUSFLAGS" => "-std=c++17 -stdlib=libc++" }
s.libraries = 'stdc++', 'c++'

end
20 changes: 20 additions & 0 deletions svg/examples/android/app/src/main/assets/svg/basic_shapes.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions svg/examples/android/app/src/main/assets/svg/clip_path.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions svg/examples/android/app/src/main/assets/svg/defs_use.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions svg/examples/android/app/src/main/assets/svg/gradients.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions svg/examples/android/app/src/main/assets/svg/image.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading