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

merge to gpu dev branch #13

Closed
wants to merge 123 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
21a894d
Update build_linux.sh
onecoolx Sep 8, 2023
cccf870
Update windows-cpp.yml
onecoolx Sep 8, 2023
a8e6e00
Update input.py
onecoolx Sep 8, 2023
ee48bf2
Update build_linux.sh
onecoolx Sep 8, 2023
91d0884
Update cp.py
onecoolx Sep 8, 2023
dfe2f7c
remove unneed functions.
onecoolx Sep 14, 2023
8ed6fd7
refine register keyword as macro
onecoolx Sep 14, 2023
3569516
Update README.md
onecoolx Sep 15, 2023
3fa741e
Update README.md
onecoolx Sep 15, 2023
4b39c18
refine matrix code to core
onecoolx Sep 18, 2023
db06581
Update Android.mk
onecoolx Sep 18, 2023
cd83611
fix fixedpoint code
onecoolx Sep 18, 2023
d48060b
Update fixedopt.h
onecoolx Sep 18, 2023
7b2b784
Create FUNDING.yml
onecoolx Sep 22, 2023
945828f
Update FUNDING.yml
onecoolx Sep 22, 2023
7177bb3
Update README.md
onecoolx Sep 22, 2023
e16cf23
Update README.md
onecoolx Sep 22, 2023
cd7be75
Update README.md
onecoolx Sep 22, 2023
2891ea1
Add files via upload
onecoolx Sep 23, 2023
b446815
Update README.md
onecoolx Sep 24, 2023
89b0d5b
Update README.md
onecoolx Sep 24, 2023
017e071
add webassembly build
Oct 24, 2023
ae2142a
fix macosx build
onecoolx Oct 25, 2023
22ef37c
Update windows-cpp.yml
onecoolx Oct 26, 2023
d6f19a4
Update windows-cpp.yml
onecoolx Oct 26, 2023
133c8b4
Update windows-cpp.yml
onecoolx Oct 26, 2023
53b85ff
Update windows-cpp.yml
onecoolx Oct 26, 2023
f053bf7
Update windows-cpp.yml
onecoolx Oct 26, 2023
1615483
Update windows-cpp.yml
onecoolx Oct 26, 2023
e6b94ea
fix wasm build
Oct 26, 2023
70f24e8
add wrapper code and test.html
Oct 27, 2023
23e121e
update lib.js
Oct 30, 2023
8c5ff32
add more binding funcs for wasm
Nov 2, 2023
cd9f2e1
add more wasm functions
Nov 2, 2023
47f530f
add more wasm wrapper methods
Nov 6, 2023
7676022
Update macosx-cpp.yml
onecoolx Nov 7, 2023
8097e18
add more wasm wrapper
Nov 7, 2023
613f613
add more wasm wrapper
Nov 8, 2023
1d7e4a9
add more wasm wrappers
Nov 9, 2023
60d3bf9
add more wasm wrapper function:wq
Nov 10, 2023
a4f6525
add more wrapper funcs
Nov 13, 2023
43653a6
add more wrapper functions.
Nov 14, 2023
e968abb
update wasm initialize
Nov 17, 2023
1f12c7b
add format tools
Dec 26, 2023
f74b645
format code style
Dec 27, 2023
ecb002a
change device clip to scissor
Apr 25, 2024
2750142
Update picasso.def
onecoolx Apr 25, 2024
5897360
add cmake build scripts
Jun 1, 2024
0c6ab9e
Update configs.gypi
onecoolx Jun 1, 2024
38bbb07
Create cmake-multi-platform.yml
onecoolx Jun 3, 2024
7ea8538
Update CMakeLists.txt
onecoolx Jun 3, 2024
7c75983
fix windows cmake build
Jun 3, 2024
b3305e7
fix linux cmake build
Jun 3, 2024
893217a
Update cmake-multi-platform.yml
onecoolx Jun 3, 2024
7a4fdab
Update cmake-multi-platform.yml
onecoolx Jun 4, 2024
42dc7e6
Update cmake-multi-platform.yml
onecoolx Jun 4, 2024
e6d3e4b
Update cmake-multi-platform.yml
onecoolx Jun 4, 2024
f0c34bf
fix workflow build
Jun 4, 2024
a0cea2a
Update README.md
onecoolx Jun 4, 2024
ebc6ce0
Update README.md
onecoolx Jun 4, 2024
61719e6
Update README.md
onecoolx Jun 4, 2024
a59a004
update visual studio project for vs2019
Jun 5, 2024
898477c
update cmake build
Jun 5, 2024
726ea1d
Update configs.cmake
onecoolx Jun 6, 2024
0686738
Update configs.cmake
onecoolx Jun 6, 2024
066c713
add cmake build for macosx
onecoolx Jun 16, 2024
c679284
Update cmake-multi-platform.yml
onecoolx Jun 17, 2024
37e8ce2
Update cmake-multi-platform.yml
onecoolx Jun 17, 2024
c8662bb
Update src.cmake
onecoolx Jun 17, 2024
fca3b6b
Update configs.cmake
onecoolx Jun 17, 2024
c7326aa
Update demos.cmake
onecoolx Jun 17, 2024
afd1a68
Update configs.cmake
onecoolx Jun 17, 2024
8492a3d
change default windows build for cmake
Jul 3, 2024
95ee6bd
Update README.md
onecoolx Jul 3, 2024
5a0f80d
change default linux build to cmake
Jul 4, 2024
0e07a8b
Update linux-cpp.yml
onecoolx Jul 4, 2024
7ab6d7c
update visual studio projects
Jul 4, 2024
b0c9f43
remove automake build scripts
Jul 4, 2024
60f3316
remove config from header
Jul 4, 2024
40a89f0
update vcproj
Jul 4, 2024
eaca866
update windows version
Jul 4, 2024
7a4eb7c
Update windows-cpp.yml
onecoolx Jul 4, 2024
ced9e7d
Update windows-cpp.yml
onecoolx Jul 4, 2024
8b04177
update wasm
Jul 4, 2024
a3ce451
remove vcproj
Jul 4, 2024
072527b
macos build with cmake default
onecoolx Jul 4, 2024
782c1db
Update macosx-cpp.yml
onecoolx Jul 5, 2024
3fc531d
Update README.md
onecoolx Jul 5, 2024
6ed8e4e
update linux build for release
Jul 5, 2024
14478e0
remove gyp build
Jul 5, 2024
4b249ba
rename 'ps_matrix_reset' to 'ps_matrix_identity'
Jul 8, 2024
c281e69
add auto config with cmake
Jul 15, 2024
be46453
Update ChangeLog
onecoolx Jul 17, 2024
983fcf2
add unit tests
Jul 17, 2024
bc599f1
Update cmake-multi-platform.yml
onecoolx Jul 17, 2024
36335f9
fix build unittest
Jul 17, 2024
b021c6d
Update context.cpp
onecoolx Jul 17, 2024
2ba24f9
fix gtest windows
Jul 18, 2024
618f946
Update unittest.cmake
onecoolx Jul 18, 2024
d7d73f5
Update README.md
onecoolx Jul 22, 2024
d464cc5
Update README.md
onecoolx Aug 3, 2024
dd4fb8b
adjust code for font
Sep 10, 2024
521225c
fix build error
Sep 10, 2024
3f8ecdb
fix android build
Sep 10, 2024
96d0452
add more check
Sep 10, 2024
7867ed9
fix cmake build script
Sep 13, 2024
cba72bd
fix cmake script for install
Sep 13, 2024
b217ebe
fix static lib build
Sep 13, 2024
920b6dc
fix codeing styles
Sep 18, 2024
dd4f9c4
turn off fast copy default
onecoolx Oct 14, 2024
60d86d8
update code for image coders
Dec 1, 2024
6657ea5
Merge branch 'master' of https://github.com/onecoolx/picasso
Dec 1, 2024
cb1a109
fix xcode build for image coder
onecoolx Dec 1, 2024
dd7dbff
add macosx image writer
onecoolx Dec 7, 2024
19d9549
adjust image decoder's header
Dec 24, 2024
6600d03
add api docs
Dec 24, 2024
6745d03
add alpha8 format support
Jan 5, 2025
7b002d9
fix gtay format
Jan 5, 2025
585d4f5
add mask owner draw with canvas
Jan 6, 2025
fa15e4a
update mask test
Jan 6, 2025
d49bcde
adjust test code
Jan 7, 2025
befbeb2
adjust test code build options
Jan 7, 2025
655ac1d
fix test code
Jan 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: onecoolx
89 changes: 89 additions & 0 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: CMake Build

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
fail-fast: false

# Set up a matrix to run the following 3 configurations:
# 1. <Windows, Release, latest MSVC compiler toolchain on the default runner image, default generator>
# 2. <Linux, Release, latest GCC compiler toolchain on the default runner image, default generator>
# 3. <Linux, Release, latest Clang compiler toolchain on the default runner image, default generator>
#
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
build_type: [Debug, Release]
c_compiler: [gcc, clang, cl]
include:
- os: windows-latest
c_compiler: cl
cpp_compiler: cl
- os: ubuntu-latest
c_compiler: gcc
cpp_compiler: g++
- os: ubuntu-latest
c_compiler: clang
cpp_compiler: clang++
- os: macos-latest
c_compiler: clang
cpp_compiler: clang++
exclude:
- os: windows-latest
c_compiler: gcc
- os: windows-latest
c_compiler: clang
- os: ubuntu-latest
c_compiler: cl
- os: macos-latest
c_compiler: cl
- os: macos-latest
c_compiler: gcc

steps:
- uses: actions/checkout@v4

- if: ${{matrix.os == 'ubuntu-latest'}}
run: |
sudo apt-get install libgtk2.0-dev

- if: ${{matrix.os == 'macos-latest'}}
run: |
python -m pip install --upgrade pip setuptools wheel packaging

- name: Set reusable strings
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DOPT_UNITTEST=ON
-S ${{ github.workspace }}

- name: Build
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}

- name: Test
working-directory: ${{ steps.strings.outputs.build-output-dir }}
# Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest --build-config ${{ matrix.build_type }}
12 changes: 5 additions & 7 deletions .github/workflows/linux-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: auto gen
run: ./autogen.sh
- name: configure
run: ./configure
- name: Setup GTK2
run: sudo apt-get install libgtk2.0-dev
- name: Generate Project
run: ./build_linux.sh
- name: make
run: make
- name: make check
run: make check
run: make -C ./proj
4 changes: 1 addition & 3 deletions .github/workflows/macosx-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ on:

jobs:
build:

runs-on: macos-latest

steps:
- uses: actions/checkout@v2
- name: gen proj
- name: Generate Project
run: ./build_macosx.sh
- name: build
run: xcodebuild -project ./proj/picasso.xcodeproj
Expand Down
15 changes: 5 additions & 10 deletions .github/workflows/windows-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
configuration: [Debug, Release]
configuration: [Debug, Release, MinSizeRel, RelWithDebInfo]

runs-on: windows-latest

Expand All @@ -22,22 +22,17 @@ jobs:

- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1.0.2

- name: Set up Python 2.7
uses: actions/setup-python@v2
with:
python-version: 2.7


- name: Generate Project
run: ./build_windows.bat

- name: Restore Project
run: msbuild ./vcproj/picasso.sln /t:Restore /p:Configuration=$env:Configuration
run: msbuild ./proj/picasso.sln /t:Restore /p:Configuration=$env:Configuration
env:
Configuration: ${{ matrix.configuration }}

- name: Build Solution
run: msbuild ./vcproj/picasso.sln /p:Configuration=$env:Configuration
run: msbuild ./proj/picasso.sln /p:Configuration=$env:Configuration
env:
Configuration: ${{ matrix.configuration }}

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
tags
proj
4 changes: 2 additions & 2 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Picasso - Version 2.5
Picasso - Version 2.8
A high quality vector graphic rendering library
Copyright (C) 2008 ~ 2023 Zhang Ji Peng (onecoolx@gmail.com)
Copyright (C) 2008 ~ 2024 Zhang Ji Peng (onecoolx@gmail.com)
134 changes: 134 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
cmake_minimum_required(VERSION 3.16.0)

project(picasso LANGUAGES C CXX ASM HOMEPAGE_URL https://onecoolx.github.io/picasso/)

set(PROJECT_ROOT ${CMAKE_CURRENT_LIST_DIR})
set(PROJECT_OUT ${CMAKE_CURRENT_BINARY_DIR})

set(VERSION_MAJOR 2)
set(VERSION_MINOR 8)
set(VERSION_MICRO 0)
set(VERSION_INFO ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MICRO})

option(BUILD_SHARED_LIBS "Build shared libraries (default)" ON)

option(OPT_FORMAT_ABGR "Pixel format ABGR support." ON)
option(OPT_FORMAT_ARGB "Pixel format ARGB support." ON)
option(OPT_FORMAT_BGRA "Pixel format BGRA support." ON)
option(OPT_FORMAT_RGBA "Pixel format RGBA support." ON)
option(OPT_FORMAT_RGB "Pixel format RGB support." ON)
option(OPT_FORMAT_BGR "Pixel format BGR support." ON)
option(OPT_FORMAT_RGB565 "Pixel format RGB565 support." ON)
option(OPT_FORMAT_RGB555 "Pixel format RGB555 support." ON)
option(OPT_FORMAT_A8 "Pixel format A8 support." ON)

option(OPT_FAST_COPY "Build Fast Memory Copy used support." OFF)
option(OPT_FREE_TYPE2 "Build FreeType2 is support." OFF)
option(OPT_FONT_CONFIG "Build FontConfig is support." OFF)
option(OPT_LOW_MEMORY "Build Low Memory used support." OFF)
option(OPT_SYSTEM_MALLOC "Build System Memory Allocator (new/delete/malloc/free/realloc/calloc) used support." OFF)

option(OPT_EXTENSIONS "Build extension libraries." ON)

option(OPT_TESTS "Build test apps" ON)
option(OPT_DEMOS "Build example demos" ON)
option(OPT_UNITTEST "Build unit tests" OFF)
option(OPT_SANITIZE "Build with Sanitizer" OFF)
option(OPT_COVERAGE "Build with Coverage" OFF)

if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Build type" FORCE)
endif()

include (${CMAKE_CURRENT_LIST_DIR}/build/configs.cmake)
include (${CMAKE_CURRENT_LIST_DIR}/build/defines.cmake)
include (${CMAKE_CURRENT_LIST_DIR}/src/src.cmake)

if (OPT_EXTENSIONS)
include (${CMAKE_CURRENT_LIST_DIR}/third_party/third_party.cmake)
include (${CMAKE_CURRENT_LIST_DIR}/ext/ext.cmake)
endif()

include (${CMAKE_CURRENT_LIST_DIR}/include/include.cmake)

if (OPT_TESTS)
include (${CMAKE_CURRENT_LIST_DIR}/test/test.cmake)
endif()

if (OPT_DEMOS)
include (${CMAKE_CURRENT_LIST_DIR}/demos/demos.cmake)
endif()

if (OPT_UNITTEST)
enable_testing()
include (${CMAKE_CURRENT_LIST_DIR}/unit_tests/unit_tests.cmake)
endif(OPT_UNITTEST)

include(CheckIncludeFile)
check_include_file(stdint.h HAVE_STDINT_H)
check_include_file(stdlib.h HAVE_STDLIB_H)
check_include_file(stddef.h HAVE_STDDEF_H)
check_include_file(string.h HAVE_STRING_H)
check_include_file(memory.h HAVE_MEMORY_H)

if (OPT_FORMAT_ABGR)
set(ENABLE_FORMAT_ABGR 1)
endif(OPT_FORMAT_ABGR)

if (OPT_FORMAT_ARGB)
set(ENABLE_FORMAT_ARGB 1)
endif(OPT_FORMAT_ARGB)

if (OPT_FORMAT_BGRA)
set(ENABLE_FORMAT_BGRA 1)
endif(OPT_FORMAT_BGRA)

if (OPT_FORMAT_RGBA)
set(ENABLE_FORMAT_RGBA 1)
endif(OPT_FORMAT_RGBA)

if (OPT_FORMAT_RGB)
set(ENABLE_FORMAT_RGB 1)
endif(OPT_FORMAT_RGB)

if (OPT_FORMAT_BGR)
set(ENABLE_FORMAT_BGR 1)
endif(OPT_FORMAT_BGR)

if (OPT_FORMAT_RGB565)
set(ENABLE_FORMAT_RGB565 1)
endif(OPT_FORMAT_RGB565)

if (OPT_FORMAT_RGB555)
set(ENABLE_FORMAT_RGB555 1)
endif(OPT_FORMAT_RGB555)

if (OPT_FORMAT_A8)
set(ENABLE_FORMAT_A8 1)
endif(OPT_FORMAT_A8)

if (OPT_FAST_COPY)
set(ENABLE_FAST_COPY 1)
endif(OPT_FAST_COPY)

if (OPT_FREE_TYPE2)
set(ENABLE_FREE_TYPE2 1)
endif(OPT_FREE_TYPE2)

if (OPT_FONT_CONFIG)
set(ENABLE_FONT_CONFIG 1)
endif(OPT_FONT_CONFIG)

if (OPT_LOW_MEMORY)
set(ENABLE_LOW_MEMORY 1)
endif(OPT_LOW_MEMORY)

if (OPT_SYSTEM_MALLOC)
set(ENABLE_SYSTEM_MALLOC 1)
endif(OPT_SYSTEM_MALLOC)

configure_file(
"${PROJECT_ROOT}/build/pconfig.h.in"
"${PROJECT_OUT}/include/pconfig.h"
)

5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

2013-02-12: Version 2.0.0
Update code version 2.0.0 alpha.
Change to BSD license.

2014-07-16: Version 2.0.1
Fix font glyph advance_x bug.
Expand Down Expand Up @@ -40,3 +41,7 @@
2023-2-17: Version 2.5.0
Update code version 2.5.0
Full support macosx system.

2024-7-16: Version 2.8.0
Update code version 2.8.0
Full build with cmake.
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "Picasso API"
PROJECT_NUMBER = 2.5
PROJECT_NUMBER = 2.8
OUTPUT_DIRECTORY = ./doc/
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
Expand Down
2 changes: 1 addition & 1 deletion COPYING → LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2014, Zhang Ji Peng <onecoolx@gmail.com>
Copyright (c) 2024, Zhang Ji Peng <onecoolx@gmail.com>
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down
9 changes: 0 additions & 9 deletions Makefile.am

This file was deleted.

Empty file removed NEWS
Empty file.
20 changes: 4 additions & 16 deletions README
Original file line number Diff line number Diff line change
@@ -1,36 +1,24 @@
HOW TO BUILD:
------------------------------------
linux:

1. automake & autoconf
./autogen.sh
./configure
make
sudo make install;


2. gyp build
1. Install cmake above v3.16 on your system
2. Build project
./build_linux.sh
cd proj
make


------------------------------------
windows:

1. Install Active Python 2.7 on your windows system and register path environment variables.

1. Install cmake above v3.16 on your windows system and register path environment variables.
2. Build project
./build_windows.bat
cd vcproj
cd proj
<open "picasso.sln" with visual studio>


-------------------------------------
macosx:

1. Install python 2.7 on your shell environment.

2. Build project
./build_macosx.sh
cd proj
Expand Down
Loading
Loading