GSoC/2019/StatusReports/Albertoefg: Difference between revisions

From KDE Community Wiki
< GSoC‎ | 2019‎ | StatusReports
No edit summary
No edit summary
Line 45: Line 45:
** [https://invent.kde.org/albertofl/krita/commit/bd654077f29b2f50cdb0ea9c93766a57295bbdb1 bd654077: Added vectorAnimatedBrush to brush server]  
** [https://invent.kde.org/albertofl/krita/commit/bd654077f29b2f50cdb0ea9c93766a57295bbdb1 bd654077: Added vectorAnimatedBrush to brush server]  
** [https://invent.kde.org/albertofl/krita/commit/ddee5b98b3aacf2cbed764f3c650167243e17a29 ddee5b98: Load Vector Animated Brush]  
** [https://invent.kde.org/albertofl/krita/commit/ddee5b98b3aacf2cbed764f3c650167243e17a29 ddee5b98: Load Vector Animated Brush]  
** [https://invent.kde.org/albertofl/krita/commit/d1afdb4053d237b123424db07bc837951d008bbe d1afdb40: Return false for empty SVG]


=== Parse SVG ===
=== Parse SVG ===
Line 73: Line 75:
** [https://invent.kde.org/albertofl/krita/commit/065ac9ba9ce8c037f8ffeedb0ce4081bf4716bcf 065ac9ba: Added a parasite helper class]  
** [https://invent.kde.org/albertofl/krita/commit/065ac9ba9ce8c037f8ffeedb0ce4081bf4716bcf 065ac9ba: Added a parasite helper class]  
** [https://invent.kde.org/albertofl/krita/commit/4d3fbd9b40260b21f138e6df30495fe0c6b3c4f3 4d3fbd9b: Fix the segmentation fault]  
** [https://invent.kde.org/albertofl/krita/commit/4d3fbd9b40260b21f138e6df30495fe0c6b3c4f3 4d3fbd9b: Fix the segmentation fault]  


=== Write a KisVectorAnimatedBrush class ===
=== Write a KisVectorAnimatedBrush class ===
Line 82: Line 85:
** [https://invent.kde.org/albertofl/krita/commit/ddee5b98b3aacf2cbed764f3c650167243e17a29 ddee5b98: Load Vector Animated Brush]
** [https://invent.kde.org/albertofl/krita/commit/ddee5b98b3aacf2cbed764f3c650167243e17a29 ddee5b98: Load Vector Animated Brush]
** [https://invent.kde.org/albertofl/krita/commit/058756d2f898127d4751bbda1b40a758e7233e3e 058756d2: Intitalize Private struct to hold KisVectorHelperPipe object]
** [https://invent.kde.org/albertofl/krita/commit/058756d2f898127d4751bbda1b40a758e7233e3e 058756d2: Intitalize Private struct to hold KisVectorHelperPipe object]
** [https://invent.kde.org/albertofl/krita/commit/7536541236ed90d376252d77c9ea5058f7aa1992 75365412: Use paintDevice to render brush ]
** [https://invent.kde.org/albertofl/krita/commit/bbd5667e219e055ddf4a80803c16a845888045d2 bbd5667e: Add destructor for Private object]


=== Write a VectorShapeObject class ===
=== Write a VectorShapeObject class ===
Line 90: Line 95:
* [https://phabricator.kde.org/T10930 Phabricator T10930]
* [https://phabricator.kde.org/T10930 Phabricator T10930]
** [https://invent.kde.org/albertofl/krita/commit/eae68aa720867cc0c94a54caca7abf2b474a2d67 eae68aa7: Add KisVectorHelperPipe Class] ''Note: This class was added in the same commit as the helper pipe class.''
** [https://invent.kde.org/albertofl/krita/commit/eae68aa720867cc0c94a54caca7abf2b474a2d67 eae68aa7: Add KisVectorHelperPipe Class] ''Note: This class was added in the same commit as the helper pipe class.''
** [https://invent.kde.org/albertofl/krita/commit/0b2ef645ce666c0173a0805ca31cb6034ef74620 0b2ef645: Inherit from KisScalingsizebrush in KisVectorShapeObject]
** [https://invent.kde.org/albertofl/krita/commit/ebdd8f8c384b1c6a30fa9d0eee1037a5da93e80e ebdd8f8c: Convert brushTip to MaskImage]
** [https://invent.kde.org/albertofl/krita/commit/9e6ee54775c2e06d723f43b1d37e3741b9ce72bd 9e6ee547: Add appropriate brushType]
** [https://invent.kde.org/albertofl/krita/commit/058756d2f898127d4751bbda1b40a758e7233e3e 058756d2: Intitalize Private struct to hold KisVectorHelperPipe object ]


=== Write a Helper Pipe class to populate the KisVectorAnimatedBrush ===
=== Write a Helper Pipe class to populate the KisVectorAnimatedBrush ===
Line 98: Line 107:
* [https://phabricator.kde.org/T10930 Phabricator T10930]
* [https://phabricator.kde.org/T10930 Phabricator T10930]
** [https://invent.kde.org/albertofl/krita/commit/eae68aa720867cc0c94a54caca7abf2b474a2d67 eae68aa7: Add KisVectorHelperPipe Class]
** [https://invent.kde.org/albertofl/krita/commit/eae68aa720867cc0c94a54caca7abf2b474a2d67 eae68aa7: Add KisVectorHelperPipe Class]
** [https://invent.kde.org/albertofl/krita/commit/30c2f3c9f2c2b11c27cb296a3e7b093f3670e7bc 30c2f3c9: Populate brushesPipe with VectorShapeObjects]


=== Change brush tip with every dab ===
=== Change brush tip with every dab ===
Line 106: Line 116:
* [https://phabricator.kde.org/T10930 Phabricator T10930]
* [https://phabricator.kde.org/T10930 Phabricator T10930]
** [https://invent.kde.org/albertofl/krita/commit/2ed1c1d5acd7e5098a85f4948893ff52cfd52ac9 2ed1c1d5: Fix iteration of shapesToimages]  
** [https://invent.kde.org/albertofl/krita/commit/2ed1c1d5acd7e5098a85f4948893ff52cfd52ac9 2ed1c1d5: Fix iteration of shapesToimages]  
** [https://invent.kde.org/albertofl/krita/commit/cda1fd56f6c6d4cb2b05fcd98b1e4d084a9561eb cda1fd56: Use chooseNextBrush to update the Index]
** [https://invent.kde.org/albertofl/krita/commit/e8248790db65b8f1280f30242041b035822182a3 e8248790 · Use KisVectorHelperPipe for the Index]


=== Save as AVB ===
=== Save as AVB ===
- TODO
- TODO

Revision as of 00:13, 23 August 2019

Krita: Animated Vector Brush

Summary

  • Project Name: Animated Vector Brush for Krita
  • Proposal: Google Docs Proposal
  • Related blog: albertoefg.info
  • Abstract: This projects aims to implement an Animated Vector Brush for Krita, which uses SVG as a source file for the brush tips. The purpose of an animated brush is to change the brush tips automatically with every dab on the canvas. This allows for a quick way to paint different images, create random and fun designs, and explore new ways to paint that are not easy in physical world. In the other hand, using SVG as a source makes it easy to share the brush tips as they are saved as plain text, as opposed to raster image brushes.

Project Goals

  • Write documentation for end users as per the Krita Contribution Guide.
  • Define the structure of the SVG file containing the source tips for the Animated Vector Brush
  • Load AVB
  • Parse SVG
  • Render brush tips as images
  • Write a parasite class to hold the index
  • Write a VectorAnimatedBrush class
  • Write a VectorShapeObject class
  • Write a helper class to populate the VectorAnimatedBrush class
  • Change brush tip with every dab
  • Save as AVB

Project related links

Implementations Status

Write documentation

  • Goal: The documentation should be written for end users as per the Krita Contribution Guide, it should also be sufficient for the users to understand and use the brush.
  • Status: The documentation is mostly done, it is only necessary to add the proper screenshots and update in case of changes.
  • TODO: Add screenshots.
  • Related blog post: My first two weeks on Google Summer of Code

Commits and Differentials

Load AVB

  • Goal: The Animated Vector Brush file should be loaded and call the proper class, in this case KisVectorAnimatedBrush.
  • Status: The implementation is done, the loading of the AVB by the user is using the +import tab.
  • Related blog post: My first two weeks on Google Summer of Code

Commits and Differentials


Parse SVG

  • Goal: The SVG should be parsed and transformed to KoShape as necessary, so Krita can use them to set brushTipImage, paint dabs or change the size of the brush tip.
  • Status: Done.
  • Related blog post: Basic functionality almost ready

Commits and Differentials

Render brush tips as images

  • Goal: The KoShapes should be transformed to QImage as necessary, so Krita can use them to set brushTipImage, paint dabs or change the size of the brush tip.
  • Status: Done.
  • Related blog post: Basic functionality almost ready

Commits and Differentials

Write a parasite class to hold the index

  • Goal: Write a parasite class that will aid KisVectorAnimatedBrush class, holding the values of the Index and related data.
  • Status: In Progress. Although the majority of the class works now, there is a need for comments and cleaning. It can also be extended to add more functionality like different types of sequences: tilt, velocity, etc.
  • Related blog post: Implementing a derivated class of kis_brushes_pipe

Commits and Differentials


Write a KisVectorAnimatedBrush class

  • Goal: Write a the class KisVectorAnimatedBrush that will inherit from KisBrushesPipe to work as a brush pipe of VectorShapeObject brushes, it will also have a Private struct to hold a KisVectorHelperPipe object.
  • Status: In Progress. The class is mostly done, however it can be extended to get more functionality.
  • Related blog post: To be written

Commits and Differentials

Write a VectorShapeObject class

  • Goal: Write a class that will work as a single brush that will hold a single KoShape and a single QImage. A series of objects of this class will populate the VectorAnimatedBrush class, using the KisVectorHelperPipe class.
  • Status: Done.
  • Related blog post: To be written

Commits and Differentials

Write a Helper Pipe class to populate the KisVectorAnimatedBrush

  • Goal: Write a helper class for KisVectorAnimatedBrush that will aid holding a parasite object of the class written earlier, and populate the pipe brush with VectorShapeObject brushes.
  • Status: Done.
  • Related blog post: To be written

Commits and Differentials

Change brush tip with every dab

  • Goal: Change the brushTipimage with every dab
  • Status: Done.
  • Related blog post: To be written

Commits and Differentials


Save as AVB

- TODO