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

Add support for partially initialized EMF images and EMF images with wrong transformation applied (Wine-generated) #38

Open
wants to merge 119 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
b33f55f
Implemented support of uninitialized viewport
maxirmx Jun 23, 2021
99c7fc1
Create cmake.yml
maxirmx Jun 24, 2021
da6382f
Update cmake.yml
maxirmx Jun 24, 2021
9e5ef70
Update cmake.yml
maxirmx Jun 24, 2021
abde31f
Update cmake.yml
maxirmx Jun 24, 2021
0ed9acf
Update cmake.yml
maxirmx Jun 24, 2021
49530e4
Added valgrind to cmake.yml
maxirmx Jun 24, 2021
4bc2200
Install
maxirmx Jun 24, 2021
67cc7ec
Install
maxirmx Jun 24, 2021
83c35cb
Update cmake.yml
maxirmx Jun 24, 2021
772046e
Install
maxirmx Jun 24, 2021
660c025
Update README.md
maxirmx Jun 24, 2021
197ba19
Update README.md
maxirmx Jun 24, 2021
f030175
In-place build
maxirmx Jun 24, 2021
7ce7b60
Coveralls.io
maxirmx Jun 24, 2021
2831e5e
Build matrix
maxirmx Jun 24, 2021
2024cb0
Install packages Ubuntu
maxirmx Jun 24, 2021
b8549a0
Update cmake.yml
maxirmx Jun 24, 2021
5107d5b
Install packages MacOS
maxirmx Jun 24, 2021
3e04b49
Install packages MacOS
maxirmx Jun 24, 2021
1feb650
Install packages MacOS
maxirmx Jun 24, 2021
5c08658
Update cmake.yml
maxirmx Jun 24, 2021
245d39a
Update cmake.yml
maxirmx Jun 24, 2021
a50916c
Update cmake.yml
maxirmx Jun 24, 2021
538467e
Update cmake.yml
maxirmx Jun 24, 2021
64be099
Update cmake.yml
maxirmx Jun 24, 2021
a0c9d03
Update cmake.yml
maxirmx Jun 24, 2021
67dbf1e
argp support
maxirmx Jun 24, 2021
9c9d34b
argp @ MacOS
maxirmx Jun 24, 2021
71b65d7
Update cmake.yml
maxirmx Jun 24, 2021
7d49161
Rename cmake.yml to Build.yml
maxirmx Jun 24, 2021
e9a277f
coreutils @ MacOS
maxirmx Jun 24, 2021
77dcf49
Update README.md
maxirmx Jun 24, 2021
a9164ab
Update Build.yml
maxirmx Jun 24, 2021
d717e47
Tests on MacOS
maxirmx Jun 24, 2021
30a17f3
Update README.md
maxirmx Jun 24, 2021
cfc6410
Update Build.yml
maxirmx Jun 24, 2021
13e773a
Merge pull request #3 from maxirmx/master
maxirmx Jun 24, 2021
0726b7e
Badge rebase
maxirmx Jun 24, 2021
0a25035
Delete outdated appveyor.yml
maxirmx Jun 24, 2021
a21acf0
Created tests with SA files
maxirmx Jun 25, 2021
a99509d
Merge pull request #1 from metanorma/master
maxirmx Jun 25, 2021
30b0747
Merge pull request #4 from maxirmx/master
maxirmx Jun 25, 2021
3d3384f
Rebasing badge
maxirmx Jun 25, 2021
57e1b93
Enterprise Architect compatibility mode
maxirmx Jun 28, 2021
a72c45f
Snapshot 30.06.2021
maxirmx Jun 30, 2021
dd2c073
#5 fix
maxirmx Jun 30, 2021
91f2933
#5 cleanup
maxirmx Jun 30, 2021
30d0945
#5 tests
maxirmx Jun 30, 2021
466cefa
#6 tests
maxirmx Jun 30, 2021
0112db2
finalizing #5, #6
maxirmx Jun 30, 2021
c65c0b9
finalizing #5, #6
maxirmx Jun 30, 2021
5899716
Coverage through github actions
maxirmx Jun 30, 2021
1560888
Coverage through github actions
maxirmx Jun 30, 2021
bd7a23b
Update Coverage.yml
maxirmx Jun 30, 2021
955e8a3
Update Build.yml
maxirmx Jun 30, 2021
49e3afd
Update Coverage.yml
maxirmx Jun 30, 2021
fc0218e
Coverage through github actions
maxirmx Jun 30, 2021
ae2f39f
Update README.md
maxirmx Jun 30, 2021
39c0782
Coverage through github actions
maxirmx Jun 30, 2021
3a08aee
Coverage through github actions
maxirmx Jun 30, 2021
22b549c
Delete outdated travis.yml file
maxirmx Jun 30, 2021
f9ec5c5
Merge branch 'metanorma:master' into master
maxirmx Jun 30, 2021
6084b05
Bug fixes (#7)
maxirmx Jun 30, 2021
e87b3d5
Badge rebase
maxirmx Jun 30, 2021
a8532ea
Rename fixEALayout to fixBrokenYTransform
ronaldtse Jul 2, 2021
5b76008
Add changelog to README:
ronaldtse Jul 2, 2021
5609309
Coveralls github action
maxirmx Jul 2, 2021
80b573c
Coveralls through github actions
maxirmx Jul 2, 2021
3d4d9fc
Update Build.yml
maxirmx Jul 2, 2021
90bba1b
Delete .coveralls.yml
maxirmx Jul 2, 2021
e8593f1
Update Build.yml
maxirmx Jul 2, 2021
846e464
COVERALLS_REPO_TOKEN
maxirmx Jul 2, 2021
052c297
Cleanup
maxirmx Jul 2, 2021
db740ad
Issue #8. Fixing size of coreners for EMRROUNDRECT
maxirmx Jul 2, 2021
fb75d2b
Test files reorganization
maxirmx Jul 2, 2021
2fc1988
Merge branch 'master' into master
maxirmx Jul 2, 2021
dd7650f
Comment fixBrokenYTransform condition
maxirmx Jul 2, 2021
7038046
Add detailed description of fixBrokenYTransform condition
maxirmx Jul 2, 2021
777eaa2
Update README.md
maxirmx Jul 2, 2021
c8f6bf3
Adding a comment re coveralls integration
maxirmx Jul 2, 2021
e6bc1d5
Update Build.yml
maxirmx Jul 2, 2021
6cada7a
Update .coveralls.yml
maxirmx Jul 2, 2021
0076c97
Update Build.yml
maxirmx Jul 2, 2021
a407af3
Update GHA for coveralls (#10)
ronaldtse Jul 2, 2021
0f2101e
Add coveralls repo token as secret
ronaldtse Jul 3, 2021
47924e6
Update README for the y-coordinate repair process
ronaldtse Jul 3, 2021
4d16997
Update a comment related to broken Y transforms
maxirmx Jul 3, 2021
3d853ce
Update Y-coordinates repair in EMF files section
maxirmx Jul 3, 2021
5795189
Delete obsolete .coveralls.yml
maxirmx Jul 3, 2021
ec5ff9c
Update README and code comment on y-axis point flip detection
ronaldtse Jul 4, 2021
0639cb0
Removed redundant test files
maxirmx Jul 16, 2021
e468950
WIndows port (#13)
maxirmx Jul 18, 2021
fda9fac
Badge rebase
maxirmx Jul 18, 2021
0be842e
Issue 15 (#17)
maxirmx Aug 22, 2021
2161d2c
Release 1.3.0
maxirmx Aug 26, 2021
9d2c1b1
vcpkg update, argp recovery
maxirmx Mar 15, 2022
021533e
Fixing Ubuntu build
maxirmx Mar 15, 2022
4e7e619
Fixing coverage task
maxirmx Mar 15, 2022
6b89678
Fixing coverage task (2)
maxirmx Mar 15, 2022
ecba815
Version bump to 1.3.1
maxirmx Mar 15, 2022
39d1b74
arm64-linux (aka aarch64) cross-compilation (#23)
maxirmx Mar 19, 2022
f6d7073
Added status badges
maxirmx Mar 22, 2022
23ca2c0
Version bump
maxirmx Mar 22, 2022
e45823b
Add Alpine Linux build (#28)
ronaldtse Mar 23, 2022
a1d2f15
Update README.md
maxirmx Mar 23, 2022
e71e2b9
Added macos arm64 workflow
maxirmx Mar 23, 2022
7645fa7
Alpine build with vcpkg and static libraries
maxirmx Apr 8, 2022
cd1e245
CMake script optimization
maxirmx Apr 8, 2022
88fb500
CMake script optimization (ubuntu)
maxirmx Apr 8, 2022
4c37deb
CMake script optimization (MacOS)
maxirmx Apr 8, 2022
e374e8f
Workflow optimization (Windows)
maxirmx Apr 8, 2022
e2aa214
release workflow optimization
maxirmx Apr 10, 2022
792609a
Add width and height attributes to the files with EA patch applied (#34)
maxirmx Apr 21, 2022
c1c81a9
Updated vcpkg submodule (#39)
maxirmx Mar 12, 2024
ba3e820
Updated GHA workflows
maxirmx Mar 12, 2024
4f5ac1f
Version bump and README fix (#41)
maxirmx Mar 12, 2024
d8631bc
Ignoring errors reported by valgrind on MacOS (ref #35)
maxirmx Mar 12, 2024
fef959f
Fixed incorrect handling of polygon fill modes (#42)
maxirmx Mar 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
*.c text eol=lf
*.cpp text eol=lf
*.h text eol=lf
*.giattributes text eol=lf
*.txt text eol=lf
*.patch text eol=lf
*.svg text eol=lf
*.sh text eol=lf
167 changes: 167 additions & 0 deletions .github/workflows/alpine-x86_64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
# Copyright (c) 2021-2024 [Ribose Inc](https://www.ribose.com).
# All rights reserved.
# This file is a part of tamatebako
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# The purpose of this workflow is to check that build procedures work correctly
# in specific environment. Due to this reason there is no caching. It is done by
# intention. All caching is in upstream projects.

name: Alpine-x86_64

on:
push:
branches: [ master ]
paths-ignore:
- '.github/workflows/macos-x86_64.yml'
- '.github/workflows/macos-arm64.yml'
- '.github/workflows/ubuntu-x86_64.yml'
- '.github/workflows/ubuntu-aarch64.yml'
- '.github/workflows/windows-x86_64.yml'
- '.github/workflows/msys-x86_64.yml'
pull_request:
workflow_dispatch:

concurrency:
group: '${{ github.workflow }}-${{ github.job }}-${{ github.head_ref || github.ref_name }}'
cancel-in-progress: true

env:
BUILD_TYPE: Release
VCPKG_FORCE_SYSTEM_BINARIES: 1
CC: gcc
CXX: g++

jobs:
build-and-test:
runs-on: ubuntu-latest
container:
image: alpine:latest

steps:
- name: Install packages
run: |
apk --no-cache --upgrade add build-base cmake git valgrind tar argp-standalone \
gcompat gperf flex bison gettext-dev python3 ninja zip unzip curl pkgconfig \
libxml2-utils font-noto-hebrew font-noto-arabic

# vcpkg prerequisites (and VCPKG_FORCE_SYSTEM_BINARIES: 1)
# gcompat gperf flex bison gettext-dev python3 ninja zip unzip curl pkg-config
# testing prerequisites
# libxml2-utils
# [ tests/resources/emf/test-183.emf ] -- font-noto-hebrew font-noto-arabic

- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Configure cache
run: |
echo 'VCPKG_DEFAULT_BINARY_CACHE<<EOF' >> $GITHUB_ENV
echo "$(pwd)/cache" >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV

- name: Create cache storage and cache key
run: |
mkdir ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
git config --global --add safe.directory $(pwd)
git submodule status > sm.txt

- name: Process cache
uses: actions/cache@v4
with:
path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
key: ${{ github.workflow }}-vcpkg-${{ hashFiles('sm.txt') }}

- name: Configure CMake
run: |
cmake -B build -DCMAKE_BUILD_TYPE=Release -DVCPKG_TARGET_TRIPLET=x64-linux -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake

- name: Build
run: |
cmake --build build --config ${{env.BUILD_TYPE}}

- name: Test well formed files
run: ./tests/resources/check_correctness.sh -r -s

- name: Test corrupted files
run: ./tests/resources/check_correctness.sh -r -s -e tests/resources/emf-corrupted/ -xN

- name: Test EA files
run: ./tests/resources/check_correctness.sh -r -s -e tests/resources/emf-ea/

build-for-ruby:
runs-on: ubuntu-latest
container:
image: alpine:latest

steps:
- name: Install packages
run: |
apk --no-cache --upgrade add build-base cmake git tar bash \
gcompat gperf flex bison gettext-dev python3 ninja zip unzip curl pkgconfig

- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Configure cache
run: |
echo 'VCPKG_DEFAULT_BINARY_CACHE<<EOF' >> $GITHUB_ENV
echo "$(pwd)/cache" >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV

- name: Create cache storage and cache key
run: |
mkdir ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
git config --global --add safe.directory /__w/libemf2svg/libemf2svg
git submodule status > sm.txt

- name: Process cache
uses: actions/cache@v4
with:
path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
key: ${{ github.workflow }}-vcpkg-${{ hashFiles('sm.txt') }}

- name: Configure CMake
run: |
cmake -B build -DCMAKE_BUILD_TYPE=Release \
-DVCPKG_TARGET_TRIPLET=x64-linux \
-DLONLY=ON \
-DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake

- name: Build
run: |
cmake --build build --config ${{env.BUILD_TYPE}}

- name: Checkout shell test framework
uses: actions/checkout@v4
with:
repository: kward/shunit2
path: tests/shunit2
fetch-depth: 1

- name: Run additional tests
run: tests/resources/lcheck.sh
103 changes: 103 additions & 0 deletions .github/workflows/macos-arm64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# Copyright (c) 2021-2024 [Ribose Inc](https://www.ribose.com).
# All rights reserved.
# This file is a part of tamatebako
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# The purpose of this workflow is to check that build procedures work correctly
# in specific environment. Due to this reason there is no caching. It is done by
# intention. All caching is in upstream projects.

name: MacOS-arm64

on:
push:
branches: [ master ]
paths-ignore:
- '.github/workflows/alpine-x86_64.yml'
- '.github/workflows/ubuntu-x86_64.yml'
- '.github/workflows/ubuntu-aarch64.yml'
- '.github/workflows/msys-x86_64.yml'
- '.github/workflows/windows-x86_64.yml'
- '.github/workflows/macos-x86_64.yml'
pull_request:
workflow_dispatch:

concurrency:
group: '${{ github.workflow }}-${{ github.job }}-${{ github.head_ref || github.ref_name }}'
cancel-in-progress: true

env:
BUILD_TYPE: Release
VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}/cache

jobs:
build-for-ruby:
runs-on: macos-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup environment
run: |
echo 'BREW_HOME<<EOF' >> $GITHUB_ENV
brew --prefix >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV

- name: Install packages
run: brew install bash

- name: Create cache storage and cache key
run: |
mkdir ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
git submodule status > sm.txt

- name: Process cache
uses: actions/cache@v4
with:
path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
key: ${{ github.workflow }}-vcpkg-${{ hashFiles('sm.txt') }}

- name: Configure CMake
run: |
cmake -B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
-DVCPKG_TARGET_TRIPLET=arm64-osx \
-DLONLY=ON \
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake

- name: Build
run: |
cmake --build build --config ${{env.BUILD_TYPE}}


- name: Checkout shell test framework
uses: actions/checkout@v4
with:
repository: kward/shunit2
path: tests/shunit2
fetch-depth: 1

- name: Run additional tests
run: ${{ env.BREW_HOME }}/bin/bash tests/resources/lcheck.sh