Login  Register

Text entities classes structure.

Posted by ClaudeQC on Apr 14, 2012; 3:12pm
URL: https://forum.librecad.org/Text-entities-classes-structure-tp5640739.html



Hello Luca,


On 2012-04-14 05:42, Luca Bellettati wrote:

>
> Hi!
> I was working on librecas to add the support of single line text to the
> application. I thought of creating a new class called RS_TextEntity in
> engine package in order to put together the common things of mtext and
> text, since many times in the project the differences between the two
> are not taken into account, but only the fact an object is a text
> entity. Am I right? In the meantime I create it and then I send it to
> you and you give me feedback, if you agree with my idea, or just discar
> it if I can do in another way.
>


On 2012-04-14 05:50, Luca Bellettati wrote:

>
> In the previous email I forget something. The class I want to create
> will take the place of rs_textdata which now is duplicate, one for text
> and one for mtext. Mine will put together what is common in the two, and
> will add the specific features in the constructor of both rs_text and
> rs_mtext class.
>

- I think it would be better keep the "rs_textdata" class, and
  make it (if not already done) the class holding common elements
  that will be used by "rs_text" and "rs_mtext" classes.

  My point is that "RS_TextEntity" looks like too much as being the
  class for the single line text entity, and thus is not a good
  class name to use for the common class.

- So, if you agree with me, we will have the following classes
  structure:

     rs_textdata --\
                         |- rs_text
                         \- rs_mtext


Regards,

Claude