![]() |
#31 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,849
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
The first way is by including the filter in body, as I do for the first image. Now, with the filter included in body, if I change the color there, then the change operates at once. Of course, this is not an economic way to include a svg filter because you need to include in every .xhtml file where you want to apply it. The second way in by including it in the css stylesheet, inside a class. In this case, I created a class named ".myCustomFilter" and I defined the filter there. But when I apply the class, the filter is not working (watch the second image). In the third image you see another svg filter, that I defined also in the css stylesheet and that filter works!! I don't know why one filter works and the other doesn't (they should work both). By in this case I think is not a bug of Sigil because I can't see the metal effect filter applied in no place (Chrome, Firefox, Thorium, etc.) when is defined in the css. |
|
![]() |
![]() |
![]() |
#32 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,849
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
|
|
![]() |
![]() |
![]() |
#33 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,906
Karma: 6120478
Join Date: Nov 2009
Device: many
|
Why not add filter=url(./MetalFilter.svg#metal) as one of the parameters in the Image1.svg file?
|
![]() |
![]() |
![]() |
#34 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,849
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
The filter's SourceGraphic and SourceAlpha refer to the contents of the file where the filter is defined. Since the Metal_Filter.svg file only contains the filter definition and no shapes (such as a <path>), the SourceGraphic is empty. It's a "blind" filter that doesn't have a source image to operate on. Therefore, it doesn't generate any results. For it to work, the filter and the shape must be in the same SVG file. You should need something like: Spoiler:
On the other hand, with the <img> tag, the rendering engine FIRST loads Image1.svg and renders it (so, at this point, the engine already knows the shape and alpha channel of the image). Then, the css filter property tells the engine to take this already rendered image and apply the filter. The filter's SourceGraphic refers to this rendered image and now it works because the filter has a "canvas" to work on. |
|
![]() |
![]() |
![]() |
#35 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,906
Karma: 6120478
Join Date: Nov 2009
Device: many
|
This is so strange. I can not see why the .myCustomFilter class version fails and the other one works.
Your original example when unpacked from the epub will not work straight up in Safari either. So my guess this style attribute filter approach will only work with a limited number of web browsers as well as limited epub3 ebook e-readers. |
![]() |
![]() |
![]() |
#36 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,906
Karma: 6120478
Join Date: Nov 2009
Device: many
|
Okay, by sheer trial and error, after clearing the web cache, if I use setUrl(QUrl("")); on the QWebEngineView it seems to finally force a full reload of everything.
I need to clean this up a bit and I will commit it to master tomorrow. With these changes your original demo epub will work properly with Qt 6.9.1 and later. FYI - we still have no plans to update our Windows, AppImage, and MacOS builds to Qt 6.9.1 for the next release as there are still too many outstanding bugs in Qt 6.9.1. |
![]() |
![]() |
![]() |
#37 | |||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,849
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
Quote:
Quote:
Last edited by RbnJrg; Yesterday at 11:20 PM. |
|||
![]() |
![]() |
![]() |
#38 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,849
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
Quote:
![]() |
||
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Kindle 4 Cant reach certain buttons issue and opening keyboard issue | Thefirebeast | KOReader | 6 | 06-26-2021 12:46 AM |
issue converting from azw3 to mobi (ccs and font issue) | fatkinglet | Conversion | 3 | 10-15-2020 10:13 PM |
preview vs print preview | isalherbo | Sigil | 7 | 04-23-2013 03:52 PM |
Nook Simple Touch Glowlight - technological issue or quality-control issue? | Dr. Drib | Barnes & Noble NOOK | 1 | 12-04-2012 01:32 PM |
Hyperlinks Issue in NLT Bible (ebook or software issue)? | myet01 | Kobo Reader | 5 | 07-29-2011 08:47 AM |