Página 1 de 1

How can we use 2 diferent pen objects on a Tcanvas?

Publicado: Lun Jul 31, 2006 11:08 pm
por Dionisis Divaris
Hello All
I try to use 2 diferent pen objects (pen1 PS_SOLID AND pen2 PS_DASH ) on a
Tcanvas object using Tcanvas:Selectpen() method but nothing happens. The
only selectable pen is pen1.
Any help would be apreciate
Regards
Dionisis

How can we use 2 diferent pen objects on a Tcanvas?

Publicado: Mar Ago 01, 2006 12:25 am
por Rene Flores
Dionisis:
He he he, I was suffering of the same last weekend, solved with help of
Ignacio.
As far as I know, you only can use a Pen object at a time in the canvas
so you have to do the following:
1) Create the new pen, asign it to a Canvas:
oPen1 := TPen():New(PS_SOLID,1,RGB(whatever))
oCanvas:oPen := oPen1
Draw whatever you want....
2) Destroy the old pen, and create a New one and also, asign it to the
canvas again:
oPen1:Destroy()
oPen2:= TPen():New(PS_DASH1,1,RGB(whatever)
oCanvas:oPen := oPen2
Keep drawing.
Regards
Rene Flores
http://www.ciber-tec.com
Divaris escribió:
> Hello All
>
> I try to use 2 diferent pen objects (pen1 PS_SOLID AND pen2 PS_DASH ) on a
> Tcanvas object using Tcanvas:Selectpen() method but nothing happens. The
> only selectable pen is pen1.
>
> Any help would be apreciate
>
> Regards
> Dionisis
>
>

How can we use 2 diferent pen objects on a Tcanvas?

Publicado: Mar Ago 01, 2006 12:25 am
por Rene Flores
Dionisis:
He he he, I was suffering of the same last weekend, solved with help of
Ignacio.
As far as I know, you only can use a Pen object at a time in the canvas
so you have to do the following:
1) Create the new pen, asign it to a Canvas:
oPen1 := TPen():New(PS_SOLID,1,RGB(whatever))
oCanvas:oPen := oPen1
Draw whatever you want....
2) Destroy the old pen, and create a New one and also, asign it to the
canvas again:
oPen1:Destroy()
oPen2:= TPen():New(PS_DASH1,1,RGB(whatever)
oCanvas:oPen := oPen2
Keep drawing.
Regards
Rene Flores
http://www.ciber-tec.com
Divaris escribió:
> Hello All
>
> I try to use 2 diferent pen objects (pen1 PS_SOLID AND pen2 PS_DASH ) on a
> Tcanvas object using Tcanvas:Selectpen() method but nothing happens. The
> only selectable pen is pen1.
>
> Any help would be apreciate
>
> Regards
> Dionisis
>
>

How can we use 2 diferent pen objects on a Tcanvas?

Publicado: Mar Ago 01, 2006 6:29 pm
por _support_
Dionisis,
Be aware that you must CREATE the pens indicating its device.
Regards,
"Dionisis Divaris" <sv1fkk@hol.gr> escribió en el mensaje
news:[email=44ce7165@news.xailer.com...]44ce7165@news.xailer.com...[/email]
> Hello All
>
> I try to use 2 diferent pen objects (pen1 PS_SOLID AND pen2 PS_DASH ) on
> a Tcanvas object using Tcanvas:Selectpen() method but nothing happens.
> The only selectable pen is pen1.
>
> Any help would be apreciate
>
> Regards
> Dionisis
>

How can we use 2 diferent pen objects on a Tcanvas?

Publicado: Mar Ago 01, 2006 6:29 pm
por _support_
Dionisis,
Be aware that you must CREATE the pens indicating its device.
Regards,
"Dionisis Divaris" <sv1fkk@hol.gr> escribió en el mensaje
news:[email=44ce7165@news.xailer.com...]44ce7165@news.xailer.com...[/email]
> Hello All
>
> I try to use 2 diferent pen objects (pen1 PS_SOLID AND pen2 PS_DASH ) on
> a Tcanvas object using Tcanvas:Selectpen() method but nothing happens.
> The only selectable pen is pen1.
>
> Any help would be apreciate
>
> Regards
> Dionisis
>

How can we use 2 diferent pen objects on a Tcanvas?

Publicado: Mar Ago 01, 2006 7:02 pm
por Dionisis Divaris
Hello Ignacio
Meaning ??????
Because i faceout the following problem . I can see the two deferent pens
in preview. But i can not print the dash line with the printer.
Many thanks both Ignacio and Rene
Regards
Dionisis
"Ignacio Ortiz de Zúñiga" <_support_@xailer.com> wrote in message
news:[email=44cf817c@news.xailer.com...]44cf817c@news.xailer.com...[/email]
> Dionisis,
>
> Be aware that you must CREATE the pens indicating its device.
>
> Regards,
>
> "Dionisis Divaris" <sv1fkk@hol.gr> escribió en el mensaje
> news:[email=44ce7165@news.xailer.com...]44ce7165@news.xailer.com...[/email]
>> Hello All
>>
>> I try to use 2 diferent pen objects (pen1 PS_SOLID AND pen2 PS_DASH ) on
>> a Tcanvas object using Tcanvas:Selectpen() method but nothing happens.
>> The only selectable pen is pen1.
>>
>> Any help would be apreciate
>>
>> Regards
>> Dionisis
>>
>
>

How can we use 2 diferent pen objects on a Tcanvas?

Publicado: Mar Ago 01, 2006 7:02 pm
por Dionisis Divaris
Hello Ignacio
Meaning ??????
Because i faceout the following problem . I can see the two deferent pens
in preview. But i can not print the dash line with the printer.
Many thanks both Ignacio and Rene
Regards
Dionisis
"Ignacio Ortiz de Zúñiga" <_support_@xailer.com> wrote in message
news:[email=44cf817c@news.xailer.com...]44cf817c@news.xailer.com...[/email]
> Dionisis,
>
> Be aware that you must CREATE the pens indicating its device.
>
> Regards,
>
> "Dionisis Divaris" <sv1fkk@hol.gr> escribió en el mensaje
> news:[email=44ce7165@news.xailer.com...]44ce7165@news.xailer.com...[/email]
>> Hello All
>>
>> I try to use 2 diferent pen objects (pen1 PS_SOLID AND pen2 PS_DASH ) on
>> a Tcanvas object using Tcanvas:Selectpen() method but nothing happens.
>> The only selectable pen is pen1.
>>
>> Any help would be apreciate
>>
>> Regards
>> Dionisis
>>
>
>

How can we use 2 diferent pen objects on a Tcanvas?

Publicado: Mié Ago 02, 2006 9:35 am
por _support_
Dionisis,
With any printer?? Really strange, please send us a sample. Thanks.
Regards,
"Dionisis Divaris" <sv1fkk@hol.gr> escribió en el mensaje
news:44cf8912$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
> Hello Ignacio
>
> Meaning ??????
>
> Because i faceout the following problem . I can see the two deferent pens
> in preview. But i can not print the dash line with the printer.
>
> Many thanks both Ignacio and Rene
> Regards
> Dionisis
>
> "Ignacio Ortiz de Zúñiga" <_support_@xailer.com> wrote in message
> news:[email=44cf817c@news.xailer.com...]44cf817c@news.xailer.com...[/email]
>> Dionisis,
>>
>> Be aware that you must CREATE the pens indicating its device.
>>
>> Regards,
>>
>> "Dionisis Divaris" <sv1fkk@hol.gr> escribió en el mensaje
>> news:[email=44ce7165@news.xailer.com...]44ce7165@news.xailer.com...[/email]
>>> Hello All
>>>
>>> I try to use 2 diferent pen objects (pen1 PS_SOLID AND pen2 PS_DASH )
>>> on a Tcanvas object using Tcanvas:Selectpen() method but nothing
>>> happens. The only selectable pen is pen1.
>>>
>>> Any help would be apreciate
>>>
>>> Regards
>>> Dionisis
>>>
>>
>>
>
>

How can we use 2 diferent pen objects on a Tcanvas?

Publicado: Mié Ago 02, 2006 9:35 am
por _support_
Dionisis,
With any printer?? Really strange, please send us a sample. Thanks.
Regards,
"Dionisis Divaris" <sv1fkk@hol.gr> escribió en el mensaje
news:44cf8912$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
> Hello Ignacio
>
> Meaning ??????
>
> Because i faceout the following problem . I can see the two deferent pens
> in preview. But i can not print the dash line with the printer.
>
> Many thanks both Ignacio and Rene
> Regards
> Dionisis
>
> "Ignacio Ortiz de Zúñiga" <_support_@xailer.com> wrote in message
> news:[email=44cf817c@news.xailer.com...]44cf817c@news.xailer.com...[/email]
>> Dionisis,
>>
>> Be aware that you must CREATE the pens indicating its device.
>>
>> Regards,
>>
>> "Dionisis Divaris" <sv1fkk@hol.gr> escribió en el mensaje
>> news:[email=44ce7165@news.xailer.com...]44ce7165@news.xailer.com...[/email]
>>> Hello All
>>>
>>> I try to use 2 diferent pen objects (pen1 PS_SOLID AND pen2 PS_DASH )
>>> on a Tcanvas object using Tcanvas:Selectpen() method but nothing
>>> happens. The only selectable pen is pen1.
>>>
>>> Any help would be apreciate
>>>
>>> Regards
>>> Dionisis
>>>
>>
>>
>
>

How can we use 2 diferent pen objects on a Tcanvas?

Publicado: Mié Ago 02, 2006 4:39 pm
por Dionisis Divaris
Hello Ignacio
Here is the code as it is on my program (with fiew changes in presentation
data). In my printer a laser OKIPAGE 8w lite, between the two halfs of page,
as in preview must be exits a doted line.
Instand of a doted line i get a straight line.
Many thanks for your help!!!
Regards
Dionisis
Ï "Ignacio Ortiz de Zúñiga" <_support_@xailer.com> Ýãñáøå óôï ìÞíõìá
news:[email=44d055e0@news.xailer.com...]44d055e0@news.xailer.com...[/email]
> Dionisis,
>
> With any printer?? Really strange, please send us a sample. Thanks.
>
> Regards,
>
> "Dionisis Divaris" <sv1fkk@hol.gr> escribió en el mensaje
> news:44cf8912$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
>> Hello Ignacio
>>
>> Meaning ??????
>>
>> Because i faceout the following problem . I can see the two deferent
>> pens
>> in preview. But i can not print the dash line with the printer.
>>
>> Many thanks both Ignacio and Rene
>> Regards
>> Dionisis
>>
>> "Ignacio Ortiz de Zúñiga" <_support_@xailer.com> wrote in message
>> news:[email=44cf817c@news.xailer.com...]44cf817c@news.xailer.com...[/email]
>>> Dionisis,
>>>
>>> Be aware that you must CREATE the pens indicating its device.
>>>
>>> Regards,
>>>
>>> "Dionisis Divaris" <sv1fkk@hol.gr> escribió en el mensaje
>>> news:[email=44ce7165@news.xailer.com...]44ce7165@news.xailer.com...[/email]
>>>> Hello All
>>>>
>>>> I try to use 2 diferent pen objects (pen1 PS_SOLID AND pen2 PS_DASH )
>>>> on a Tcanvas object using Tcanvas:Selectpen() method but nothing
>>>> happens. The only selectable pen is pen1.
>>>>
>>>> Any help would be apreciate
>>>>
>>>> Regards
>>>> Dionisis
>>>>
>>>
>>>
>>
>>
>
>


Attached files Pens_Issue.rar (2.9 KB)Â

How can we use 2 diferent pen objects on a Tcanvas?

Publicado: Mié Ago 02, 2006 4:39 pm
por Dionisis Divaris
Hello Ignacio
Here is the code as it is on my program (with fiew changes in presentation
data). In my printer a laser OKIPAGE 8w lite, between the two halfs of page,
as in preview must be exits a doted line.
Instand of a doted line i get a straight line.
Many thanks for your help!!!
Regards
Dionisis
Ï "Ignacio Ortiz de Zúñiga" <_support_@xailer.com> Ýãñáøå óôï ìÞíõìá
news:[email=44d055e0@news.xailer.com...]44d055e0@news.xailer.com...[/email]
> Dionisis,
>
> With any printer?? Really strange, please send us a sample. Thanks.
>
> Regards,
>
> "Dionisis Divaris" <sv1fkk@hol.gr> escribió en el mensaje
> news:44cf8912$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
>> Hello Ignacio
>>
>> Meaning ??????
>>
>> Because i faceout the following problem . I can see the two deferent
>> pens
>> in preview. But i can not print the dash line with the printer.
>>
>> Many thanks both Ignacio and Rene
>> Regards
>> Dionisis
>>
>> "Ignacio Ortiz de Zúñiga" <_support_@xailer.com> wrote in message
>> news:[email=44cf817c@news.xailer.com...]44cf817c@news.xailer.com...[/email]
>>> Dionisis,
>>>
>>> Be aware that you must CREATE the pens indicating its device.
>>>
>>> Regards,
>>>
>>> "Dionisis Divaris" <sv1fkk@hol.gr> escribió en el mensaje
>>> news:[email=44ce7165@news.xailer.com...]44ce7165@news.xailer.com...[/email]
>>>> Hello All
>>>>
>>>> I try to use 2 diferent pen objects (pen1 PS_SOLID AND pen2 PS_DASH )
>>>> on a Tcanvas object using Tcanvas:Selectpen() method but nothing
>>>> happens. The only selectable pen is pen1.
>>>>
>>>> Any help would be apreciate
>>>>
>>>> Regards
>>>> Dionisis
>>>>
>>>
>>>
>>
>>
>
>


Attached files Pens_Issue.rar (2.9 KB)Â

How can we use 2 diferent pen objects on a Tcanvas?

Publicado: Vie Ago 04, 2006 9:51 am
por _support_
Dionisis,
There were few problems:
1) You did not create the pen indicating its device
2) Wrong pen destruction
3) Incorrect size for dashed pend, they do not accept sizes greater than
one.
BTW calls to methods Printer:StartDoc and Printer:EndDoc were missing.
Regards,
From the Windows API:
HPEN CreatePen(
int fnPenStyle, // pen style
int nWidth, // pen width
COLORREF crColor // pen color
);
Parameters
fnPenStyle
Specifies the pen style. It can be any one of the following values:
Style Description
PS_SOLID Pen is solid.
PS_DASH Pen is dashed. This style is valid only when the pen width is one or
less in device units.
PS_DOT Pen is dotted. This style is valid only when the pen width is one or
less in device units.
PS_DASHDOT Pen has alternating dashes and dots. This style is valid only
when the pen width is one or less in device units.
PS_DASHDOTDOT Pen has alternating dashes and double dots. This style is
valid only when the pen width is one or less in device units.
PS_NULL Pen is invisible.
PS_INSIDEFRAME Pen is solid. When this pen is used in any graphics device
interface (GDI) drawing function that takes a bounding rectangle, the
dimensions of the figure are shrunk so that it fits entirely in the bounding
rectangle, taking into account the width of the pen. This applies only to
geometric pens.
"Dionisis Divaris" <sv1fkk@hol.gr> escribió en el mensaje
news:[email=44d0b908@news.xailer.com...]44d0b908@news.xailer.com...[/email]
> Hello Ignacio
>
> Here is the code as it is on my program (with fiew changes in presentation
> data). In my printer a laser OKIPAGE 8w lite, between the two halfs of
> page,
> as in preview must be exits a doted line.
> Instand of a doted line i get a straight line.
>
> Many thanks for your help!!!
> Regards
> Dionisis
> Ï "Ignacio Ortiz de Zúñiga" <_support_@xailer.com> Ýãñáøå óôï ìÞíõìá
> news:[email=44d055e0@news.xailer.com...]44d055e0@news.xailer.com...[/email]
>> Dionisis,
>>
>> With any printer?? Really strange, please send us a sample. Thanks.
>>
>> Regards,
>>
>> "Dionisis Divaris" <sv1fkk@hol.gr> escribió en el mensaje
>> news:44cf8912$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
>>> Hello Ignacio
>>>
>>> Meaning ??????
>>>
>>> Because i faceout the following problem . I can see the two deferent
>>> pens
>>> in preview. But i can not print the dash line with the printer.
>>>
>>> Many thanks both Ignacio and Rene
>>> Regards
>>> Dionisis
>>>
>>> "Ignacio Ortiz de Zúñiga" <_support_@xailer.com> wrote in message
>>> news:[email=44cf817c@news.xailer.com...]44cf817c@news.xailer.com...[/email]
>>>> Dionisis,
>>>>
>>>> Be aware that you must CREATE the pens indicating its device.
>>>>
>>>> Regards,
>>>>
>>>> "Dionisis Divaris" <sv1fkk@hol.gr> escribió en el mensaje
>>>> news:[email=44ce7165@news.xailer.com...]44ce7165@news.xailer.com...[/email]
>>>>> Hello All
>>>>>
>>>>> I try to use 2 diferent pen objects (pen1 PS_SOLID AND pen2 PS_DASH )
>>>>> on a Tcanvas object using Tcanvas:Selectpen() method but nothing
>>>>> happens. The only selectable pen is pen1.
>>>>>
>>>>> Any help would be apreciate
>>>>>
>>>>> Regards
>>>>> Dionisis
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
>


Attached files test.zip (2.5 KB)Â

How can we use 2 diferent pen objects on a Tcanvas?

Publicado: Vie Ago 04, 2006 9:51 am
por _support_
Dionisis,
There were few problems:
1) You did not create the pen indicating its device
2) Wrong pen destruction
3) Incorrect size for dashed pend, they do not accept sizes greater than
one.
BTW calls to methods Printer:StartDoc and Printer:EndDoc were missing.
Regards,
From the Windows API:
HPEN CreatePen(
int fnPenStyle, // pen style
int nWidth, // pen width
COLORREF crColor // pen color
);
Parameters
fnPenStyle
Specifies the pen style. It can be any one of the following values:
Style Description
PS_SOLID Pen is solid.
PS_DASH Pen is dashed. This style is valid only when the pen width is one or
less in device units.
PS_DOT Pen is dotted. This style is valid only when the pen width is one or
less in device units.
PS_DASHDOT Pen has alternating dashes and dots. This style is valid only
when the pen width is one or less in device units.
PS_DASHDOTDOT Pen has alternating dashes and double dots. This style is
valid only when the pen width is one or less in device units.
PS_NULL Pen is invisible.
PS_INSIDEFRAME Pen is solid. When this pen is used in any graphics device
interface (GDI) drawing function that takes a bounding rectangle, the
dimensions of the figure are shrunk so that it fits entirely in the bounding
rectangle, taking into account the width of the pen. This applies only to
geometric pens.
"Dionisis Divaris" <sv1fkk@hol.gr> escribió en el mensaje
news:[email=44d0b908@news.xailer.com...]44d0b908@news.xailer.com...[/email]
> Hello Ignacio
>
> Here is the code as it is on my program (with fiew changes in presentation
> data). In my printer a laser OKIPAGE 8w lite, between the two halfs of
> page,
> as in preview must be exits a doted line.
> Instand of a doted line i get a straight line.
>
> Many thanks for your help!!!
> Regards
> Dionisis
> Ï "Ignacio Ortiz de Zúñiga" <_support_@xailer.com> Ýãñáøå óôï ìÞíõìá
> news:[email=44d055e0@news.xailer.com...]44d055e0@news.xailer.com...[/email]
>> Dionisis,
>>
>> With any printer?? Really strange, please send us a sample. Thanks.
>>
>> Regards,
>>
>> "Dionisis Divaris" <sv1fkk@hol.gr> escribió en el mensaje
>> news:44cf8912$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
>>> Hello Ignacio
>>>
>>> Meaning ??????
>>>
>>> Because i faceout the following problem . I can see the two deferent
>>> pens
>>> in preview. But i can not print the dash line with the printer.
>>>
>>> Many thanks both Ignacio and Rene
>>> Regards
>>> Dionisis
>>>
>>> "Ignacio Ortiz de Zúñiga" <_support_@xailer.com> wrote in message
>>> news:[email=44cf817c@news.xailer.com...]44cf817c@news.xailer.com...[/email]
>>>> Dionisis,
>>>>
>>>> Be aware that you must CREATE the pens indicating its device.
>>>>
>>>> Regards,
>>>>
>>>> "Dionisis Divaris" <sv1fkk@hol.gr> escribió en el mensaje
>>>> news:[email=44ce7165@news.xailer.com...]44ce7165@news.xailer.com...[/email]
>>>>> Hello All
>>>>>
>>>>> I try to use 2 diferent pen objects (pen1 PS_SOLID AND pen2 PS_DASH )
>>>>> on a Tcanvas object using Tcanvas:Selectpen() method but nothing
>>>>> happens. The only selectable pen is pen1.
>>>>>
>>>>> Any help would be apreciate
>>>>>
>>>>> Regards
>>>>> Dionisis
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
>


Attached files test.zip (2.5 KB)Â

How can we use 2 diferent pen objects on a Tcanvas?

Publicado: Sab Ago 05, 2006 2:34 pm
por Dionisis Divaris
Many Thanks Ignacio
The missing link was the Printer parameter in Tpens definitions and the
width=1 for the DASH pen.
Works prefect now.
A great thanks again for your valued help.
Regards
Dionisis
Ï "Ignacio Ortiz de Zúñiga" <_support_@xailer.com> Ýãñáøå óôï ìÞíõìá
news:[email=44d447fb@news.xailer.com...]44d447fb@news.xailer.com...[/email]
> Dionisis,
>
> There were few problems:
>
> 1) You did not create the pen indicating its device
> 2) Wrong pen destruction
> 3) Incorrect size for dashed pend, they do not accept sizes greater than
> one.
>
> BTW calls to methods Printer:StartDoc and Printer:EndDoc were missing.
>
> Regards,
>
> From the Windows API:
>
> HPEN CreatePen(
> int fnPenStyle, // pen style
> int nWidth, // pen width
> COLORREF crColor // pen color
> );
>
> Parameters
> fnPenStyle
>
> Specifies the pen style. It can be any one of the following values:
>
> Style Description
> PS_SOLID Pen is solid.
> PS_DASH Pen is dashed. This style is valid only when the pen width is one
> or less in device units.
> PS_DOT Pen is dotted. This style is valid only when the pen width is one
> or less in device units.
> PS_DASHDOT Pen has alternating dashes and dots. This style is valid only
> when the pen width is one or less in device units.
> PS_DASHDOTDOT Pen has alternating dashes and double dots. This style is
> valid only when the pen width is one or less in device units.
> PS_NULL Pen is invisible.
> PS_INSIDEFRAME Pen is solid. When this pen is used in any graphics device
> interface (GDI) drawing function that takes a bounding rectangle, the
> dimensions of the figure are shrunk so that it fits entirely in the
> bounding rectangle, taking into account the width of the pen. This applies
> only to geometric pens.
>
>
> "Dionisis Divaris" <sv1fkk@hol.gr> escribió en el mensaje
> news:[email=44d0b908@news.xailer.com...]44d0b908@news.xailer.com...[/email]
>> Hello Ignacio
>>
>> Here is the code as it is on my program (with fiew changes in
>> presentation
>> data). In my printer a laser OKIPAGE 8w lite, between the two halfs of
>> page,
>> as in preview must be exits a doted line.
>> Instand of a doted line i get a straight line.
>>
>> Many thanks for your help!!!
>> Regards
>> Dionisis
>> Ï "Ignacio Ortiz de Zúñiga" <_support_@xailer.com> Ýãñáøå óôï ìÞíõìá
>> news:[email=44d055e0@news.xailer.com...]44d055e0@news.xailer.com...[/email]
>>> Dionisis,
>>>
>>> With any printer?? Really strange, please send us a sample. Thanks.
>>>
>>> Regards,
>>>
>>> "Dionisis Divaris" <sv1fkk@hol.gr> escribió en el mensaje
>>> news:44cf8912$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
>>>> Hello Ignacio
>>>>
>>>> Meaning ??????
>>>>
>>>> Because i faceout the following problem . I can see the two deferent
>>>> pens
>>>> in preview. But i can not print the dash line with the printer.
>>>>
>>>> Many thanks both Ignacio and Rene
>>>> Regards
>>>> Dionisis
>>>>
>>>> "Ignacio Ortiz de Zúñiga" <_support_@xailer.com> wrote in message
>>>> news:[email=44cf817c@news.xailer.com...]44cf817c@news.xailer.com...[/email]
>>>>> Dionisis,
>>>>>
>>>>> Be aware that you must CREATE the pens indicating its device.
>>>>>
>>>>> Regards,
>>>>>
>>>>> "Dionisis Divaris" <sv1fkk@hol.gr> escribió en el mensaje
>>>>> news:[email=44ce7165@news.xailer.com...]44ce7165@news.xailer.com...[/email]
>>>>>> Hello All
>>>>>>
>>>>>> I try to use 2 diferent pen objects (pen1 PS_SOLID AND pen2
>>>>>> PS_DASH )
>>>>>> on a Tcanvas object using Tcanvas:Selectpen() method but nothing
>>>>>> happens. The only selectable pen is pen1.
>>>>>>
>>>>>> Any help would be apreciate
>>>>>>
>>>>>> Regards
>>>>>> Dionisis
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>>
>
>
>

How can we use 2 diferent pen objects on a Tcanvas?

Publicado: Sab Ago 05, 2006 2:34 pm
por Dionisis Divaris
Many Thanks Ignacio
The missing link was the Printer parameter in Tpens definitions and the
width=1 for the DASH pen.
Works prefect now.
A great thanks again for your valued help.
Regards
Dionisis
Ï "Ignacio Ortiz de Zúñiga" <_support_@xailer.com> Ýãñáøå óôï ìÞíõìá
news:[email=44d447fb@news.xailer.com...]44d447fb@news.xailer.com...[/email]
> Dionisis,
>
> There were few problems:
>
> 1) You did not create the pen indicating its device
> 2) Wrong pen destruction
> 3) Incorrect size for dashed pend, they do not accept sizes greater than
> one.
>
> BTW calls to methods Printer:StartDoc and Printer:EndDoc were missing.
>
> Regards,
>
> From the Windows API:
>
> HPEN CreatePen(
> int fnPenStyle, // pen style
> int nWidth, // pen width
> COLORREF crColor // pen color
> );
>
> Parameters
> fnPenStyle
>
> Specifies the pen style. It can be any one of the following values:
>
> Style Description
> PS_SOLID Pen is solid.
> PS_DASH Pen is dashed. This style is valid only when the pen width is one
> or less in device units.
> PS_DOT Pen is dotted. This style is valid only when the pen width is one
> or less in device units.
> PS_DASHDOT Pen has alternating dashes and dots. This style is valid only
> when the pen width is one or less in device units.
> PS_DASHDOTDOT Pen has alternating dashes and double dots. This style is
> valid only when the pen width is one or less in device units.
> PS_NULL Pen is invisible.
> PS_INSIDEFRAME Pen is solid. When this pen is used in any graphics device
> interface (GDI) drawing function that takes a bounding rectangle, the
> dimensions of the figure are shrunk so that it fits entirely in the
> bounding rectangle, taking into account the width of the pen. This applies
> only to geometric pens.
>
>
> "Dionisis Divaris" <sv1fkk@hol.gr> escribió en el mensaje
> news:[email=44d0b908@news.xailer.com...]44d0b908@news.xailer.com...[/email]
>> Hello Ignacio
>>
>> Here is the code as it is on my program (with fiew changes in
>> presentation
>> data). In my printer a laser OKIPAGE 8w lite, between the two halfs of
>> page,
>> as in preview must be exits a doted line.
>> Instand of a doted line i get a straight line.
>>
>> Many thanks for your help!!!
>> Regards
>> Dionisis
>> Ï "Ignacio Ortiz de Zúñiga" <_support_@xailer.com> Ýãñáøå óôï ìÞíõìá
>> news:[email=44d055e0@news.xailer.com...]44d055e0@news.xailer.com...[/email]
>>> Dionisis,
>>>
>>> With any printer?? Really strange, please send us a sample. Thanks.
>>>
>>> Regards,
>>>
>>> "Dionisis Divaris" <sv1fkk@hol.gr> escribió en el mensaje
>>> news:44cf8912$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
>>>> Hello Ignacio
>>>>
>>>> Meaning ??????
>>>>
>>>> Because i faceout the following problem . I can see the two deferent
>>>> pens
>>>> in preview. But i can not print the dash line with the printer.
>>>>
>>>> Many thanks both Ignacio and Rene
>>>> Regards
>>>> Dionisis
>>>>
>>>> "Ignacio Ortiz de Zúñiga" <_support_@xailer.com> wrote in message
>>>> news:[email=44cf817c@news.xailer.com...]44cf817c@news.xailer.com...[/email]
>>>>> Dionisis,
>>>>>
>>>>> Be aware that you must CREATE the pens indicating its device.
>>>>>
>>>>> Regards,
>>>>>
>>>>> "Dionisis Divaris" <sv1fkk@hol.gr> escribió en el mensaje
>>>>> news:[email=44ce7165@news.xailer.com...]44ce7165@news.xailer.com...[/email]
>>>>>> Hello All
>>>>>>
>>>>>> I try to use 2 diferent pen objects (pen1 PS_SOLID AND pen2
>>>>>> PS_DASH )
>>>>>> on a Tcanvas object using Tcanvas:Selectpen() method but nothing
>>>>>> happens. The only selectable pen is pen1.
>>>>>>
>>>>>> Any help would be apreciate
>>>>>>
>>>>>> Regards
>>>>>> Dionisis
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>>
>
>
>