The full project can be found at: https://docs.google.com/document/d/1SwIBNFthJ5Qg3N7DBgzMKMrW-rn5hB_NPxuf8EuMr2w/edit?usp=sharing
Krita can handle SVG 1.1 right now, however there is not much that can be done with this format.
This project aims to implement an animated brush for Krita that will be saved as an SVG symbol library. Allowing an easier distribution of animated brushes, higher resolutions and ease to keep them under source control.
- Write the proper documentation for end users as per the Krita Contribution Guide.
- Write unit tests, comments, and documentation for better maintainability.
- Define the tags and structure of an SVG library containing the source tips for a Pipe/Animated brush for Krita.
- Write the code for a Pipe/Animated Brush uses that uses an SVG library a source.
- Create the User Interface for loading and configuring the Pipe/Animated Brush, which should be done in accordance with the KDE Human Interface Guidelines.
- Bond, learn, and become an important member of the Krita and KDE communities.
- Get user and artist feedback for the implementation of the project.
- Learn about the KDE Human Interface Guidelines (HIG), Community Identity Guidelines (CIG) and Accessibility Guidelines (AG.)
- Learn about the testing libraries and guidelines used by Krita and KDE.
- Have fun!! 😄
Community Bonding Period
0. Learn about the similar implementations that already exists
0.1 Understand Alchemy Pull Shapes.
0.2 Understand GIH brushes.
0.3 Understand Krita SVG libraries.
0.4 Understand Krita Unit Testing framework.
0.5 Add my personal blog to Planet KDE.
0.6 Get feedback from digital artists and the community on how would they use this tool. This will include asking about the options they would like to see in the user interface, how do they use similar tool on other programs, and what other features would they like to see. For the users to feel very comfortable using this tool.
0.6.1 Write a blog post about ideas for the implementation, to get more feedback and discussion.
0.6.2 Posting on reddit to invite the community to join with ideas and discussion.
0.6.3 Choose the best options to include in the user interface.
0.7 Testing and playing with related code, to choose the best way to implement the brush.
0.8 Talk with the mentors about the results and choose the best solutions.
0.9 Being on Krita IRC channel to help users and bond with the community. (Already started)
0.10 Help with bugs that, preferently if they are relevant to the project, to increase my knowledge and create the best implementation possible. (Already started to work on: bug 406124)
Google Summer of Code
1. Write end user documentation.
May 27 - June 01
At the end of this period the documentation for the end user will be mostly done, (there might be some minor changes in the future). The documentation will be about the SVG Pipe/Animated Brush, according to the Krita Contribution Guide. This task should give me a very specific idea of how the end result will be for the user.
1.1 Write the end user documentation about the use of the Pipe/Animated brush.
2. Loading and parsing an SVG library.
June 02 - June 15
At the end of this point it should be possible to load and parse an SVG library file. This should return a collection with all the “symbol” tags and all the metadata of the SVG library. This should be done using the class KoSvgSymbolCollectionResource from the Flake library. This includes comments, documentation and unit testing.
2.1 Implement a series of tests to load different SVG libraries, this tests should be part of the class KoSvgSymbolCollectionResource,since it does not have any at the moment:
With no shapes: Should give an error because file is blank. With one shape: Should parse the shape and return a collection of one element, with “symbol” tag and metadata. With multiple shapes: Should parse all the shapes and return a collection of as many elements as shapes each with the correspondent “symbol” tag and correct metadata. 10 shapes SVG library. 100 shapes SVG library. 1000 shapes SVG library. With some not-vector shapes: Should ignore not-vectors and return a collection of as many vector shapes, each with the correspondent “symbol” tag and correct metadata. 10 shapes SVG library. 100 shapes SVG library. 1000 shapes SVG library. With only not-vector shapes: Should give an error because there are no vectors. File is not an SVG: should give an error.
If Using Flake Vector objects:
2.2 Write a new class with the functions required to load a trivial SVG library, according to the tests already written. This class should use the class KoSvgSymbolCollectionResource and load the SVG library as its own vector layer.
If Using KisImagePipeBrush:
2.3 Write the required functions inside KisImagePipeBrush to implement the functionality required to load a trivial SVG library, according to the tests already written. This should be using th e class KoSvgSymbolCollectionResource to load the SVG library.
2.4 Write a blog post on planet.kde.org about the work done so far.
3. Rendering SVG shapes
June 16 - June 30
At the end of this period it should be possible to paint in Krita’s canvas using the brush. Following the previous discussions in sections 1.3.4 and 3.5, the method that will be used to render the vectors as raster images haven’t been selected yet. This will be decided according to the “testing” point of section 1.3.4.
3.1 Implement a series of tests to render different SVG libraries:
Small size: brush at a size of 3x3 px. Medium size: brush at a size of 500x500 px. Big size: brush at a size of 1000x1000 px. Each one of the previous will also test for SVG libraries of different sizes: 10 shapes SVG symbol library. 100 shapes SVG symbol library. 1000 shapes SVG symbol library.
If Using Flake Vector objects:
3.2 Create a KisBrush subclass that encapsulates a KisShapeLayer; and then renders the individual shapes at the desired size. Write the required functions to cache those images and use them as brush tips. This will also require tests for the cache functions.
If Using KisImagePipeBrush:
3.3 Write the functions necessary to transform the shapes into raster images. This should be done using with SvgParser from the Flake library and the images will go through KisImagePipeBrush, rasterized into a normal KisBrushesPipe object, which will render the brushes out-of-box.
3.4 The parsed shapes should be visualized inside an Objects docker.
3.5 Write a blog post on planet.kde.org about the work done so far.
4. User Interface
June 23 - July 15
At the end of this period there should be a user interface to provide the user with tools for using this type of brushes.
The tools and options included in the user interface will be decided after getting feedback from the community during the Community Bonding Period, but tentatively the following options should be included:
Import and delete SVG symbol library. Options for brush Brush selector Size Spacing Rotation Save Brush
4.1 Create the user interface with all the options necessary to load, save and edit this type of brushes. The user interface should follow the KDE Human Interface Guidelines.
4.2 Write a blog post on planet.kde.org about the work done so far.
5. Saving as SVG symbol library
July 15 - August 01
At the end of this period it should be possible to save an SVG symbol library, using the class KoSvgSymbolCollectionResource from the Flake library, with the appropriate “<symbol>” tags and all the metadata set through the User Interface.
5.1 Write the functions necessary to save as SVG library with the <symbol> tags for correspondant shapes.
6. Fixing bugs
August 01 - August 05
This small period will be focused on finding and fixing the bugs.
During this period I will travel to Netherlands for the Krita Sprint.
6.1 Find and fix bugs.
6.2 Travel to Krita Sprint.
August 03 - August 19
This period will be focused on working with the Krita team during the Krita Sprint to polish and finish the brush.
7.1 Finish the brush with all the requirements.
7.2 Write a blog post on planet.kde.org about the results of Google Summer of Code.
7.3 Thank the community and my mentors.
7.4 Celebrate 😄