[scribus-dev] trying to figure this out

dockattt katttdoc at gmail.com
Tue May 23 02:48:19 UTC 2017


yes, this looks like it's it!   When I started 1.4.6 up it must be using 
points as the unit default.  1.5.2 the document setup says the unit is 
inches.   Switch that over to points and everything works as "i expect". 
:D   Thanks for your help!



On 05/22/2017 08:09 PM, Gregory Pittman wrote:
> On 05/22/2017 04:18 PM, dockattt wrote:
>> hi,
>>
>> sorry Craig about the last message not being clear enough.  I'm working
>> on some code to use in the python console.   I've created a function
>> that makes TextFrame.  I reused the code in cmdobj.cpp for creating a
>> text frame.  That function is called: *scribus_newtext.  It creates a
>> text frame with this code:
>>
>>      int i =
>> ScCore->primaryMainWindow()->doc->itemAdd(PageItem::TextFrame,
>> PageItem::Unspecified,
>>                                  pageUnitXToDocX(x),
>>                                  pageUnitYToDocY(y),
>>                                  ValueToPoint(w),
>>                                  ValueToPoint(h),
>> ScCore->primaryMainWindow()->doc->itemToolPrefs().shapeLineWidth,
>> CommonStrings::None,
>> ScCore->primaryMainWindow()->doc->itemToolPrefs().textColor);
>>
>>
>> in the Scribus 1.5.2 python console I write:
>>
>> createText(40,40,100,100)
>>
>> and it creates a giant Text Frame way off to the bottom left of the page
>> I'm on.
> Sounds like your page units are something other than points. I just ran
> this in the console in 1.5.3svn and it works fine.
>
> Greg
>
> _______________________________________________
> scribus-dev mailing list
> scribus-dev at lists.scribus.net
> http://lists.scribus.net/mailman/listinfo/scribus-dev




More information about the scribus-dev mailing list