View Issue Details

IDProjectCategoryView StatusLast Update
0017056ScribusCanvaspublic2023-12-24 10:00
Reporternitramr Assigned Tojghali  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformDesktop PCOSUbuntuOS Version23.10 64-bit
Product Version1.5.8 
Target Version1.6 milestoneFixed in Version1.6.0.svn 
Summary0017056: Page margin rect inherits drop shadow properties of line item
DescriptionA line item should not have a fill color. If you change the fill mode from solid to gradient or hatch, it seems like the line item has kind of a fill color and the drop shadow drawing uses the rect of page margin rect to draw the drop shadow.
Steps To Reproduce1. Create a new document and draw a line item
2. Select line item and enable drop shadow
3. Go to color panel and set fill mode to gradient or hatch
4. Page margin rect inherits drop shadow settings of line item
TagsNo tags attached.
PatchYes

Activities

nitramr

2023-11-22 20:06

developer  

nitramr

2023-11-26 13:08

developer   ~0050518

Last edited: 2023-11-26 13:12

I made a fix for this issue.

A line page element always returns false for hasFill().
I also did a test of converting a line item to a Bezier curve. In this case there are no rendering problems on the canvas.
fixDropShadow_2023-11-26_01.patch (1,203 bytes)   
Index: scribus/pageitem.cpp
===================================================================
--- scribus/pageitem.cpp	(Revision 25835)
+++ scribus/pageitem.cpp	(Arbeitskopie)
@@ -11193,6 +11193,14 @@
 	return QString(xml.c_str());
 }
 
+bool PageItem::hasFill()
+{
+	if(itemType() == ItemType::Line)
+		return false;
+
+	return ((fillColor() != CommonStrings::None) || (GrType != 0));
+}
+
 bool compareItemLevel(const PageItem* item1, const PageItem* item2)
 {
 	int level1 = item1->level();
Index: scribus/pageitem.h
===================================================================
--- scribus/pageitem.h	(Revision 25835)
+++ scribus/pageitem.h	(Arbeitskopie)
@@ -1286,7 +1286,7 @@
 	QString getItemTextSaxed(int selStart, int selLength); ///< used by notes frames to get content of notes from itemText
 	bool groupClipping() { return m_groupClips; }
 	void setGroupClipping(bool val) { m_groupClips = val; }
-	bool hasFill() { return ((fillColor() != CommonStrings::None) || (GrType != 0)); }
+	bool hasFill();
 	bool hasStroke() { return ((lineColor() != CommonStrings::None) || (GrTypeStroke != 0) || (!NamedLStyle.isEmpty()) || (!patternStrokeVal.isEmpty())); }
 
 		// End public functions

jghali

2023-11-27 22:42

administrator   ~0050530

Thanks. I kept the basics, however I changed hasFill() to be virtual and made PageItem_Line hasFill() implementation directly return false.

Issue History

Date Modified Username Field Change
2023-11-22 20:06 nitramr New Issue
2023-11-22 20:06 nitramr File Added: Bildschirmfoto vom 2023-11-22 21-05-49.png
2023-11-26 13:08 nitramr Note Added: 0050518
2023-11-26 13:08 nitramr File Added: fixDropShadow_2023-11-26_01.patch
2023-11-26 13:09 nitramr Summary Page margin rect inherit drop shadow properties of line item => [PATCH] Page margin rect inherit drop shadow properties of line item
2023-11-26 13:10 nitramr Assigned To => nitramr
2023-11-26 13:10 nitramr Status new => assigned
2023-11-26 13:10 nitramr Patch No => Yes
2023-11-26 13:12 nitramr Note Edited: 0050518
2023-11-26 13:12 nitramr Note Edited: 0050518
2023-11-27 20:03 cbradney Assigned To nitramr => jghali
2023-11-27 22:40 jghali Summary [PATCH] Page margin rect inherit drop shadow properties of line item => Page margin rect inherits drop shadow properties of line item
2023-11-27 22:42 jghali Note Added: 0050530
2023-11-27 22:43 jghali Status assigned => resolved
2023-11-27 22:43 jghali Resolution open => fixed
2023-11-27 22:43 jghali Fixed in Version => 1.6.0.svn
2023-12-24 10:00 cbradney Status resolved => closed