Thursday, May 17, 2012
Google Custom Search

ClearCanvas Highlights

Download our Open Source software
Watch some Videos
Get the Source
Check out our Licensing
Join our  Forums
Some Research: OICR IPP-Trials

Our Community

Membership Membership:
Latest New User Latest: JBauza
New Today New Today: 19
New Yesterday New Yesterday: 33
User Count Overall: 22559

People Online People Online:
Visitors Visitors: 16
Members Members: 0
Total Total: 16

Online Now Online Now:

ClearCanvas Community Forums

How do I find the text width in the primitive..?
Last Post 2009-05-28 05:03 PM by gregofiesh. 0 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
gregofiesh
Advanced Member
Advanced Member
Posts:42

--
2009-05-28 05:03 PM  

When working with the InvariantTextPrimitive:

The anchor is adjustable in position to the image, but is always the center of the text object.

I now see that the bounding rect is calculated when the text is about to be displayed within the rendering class objects.

I want the anchor to be the top left corner of the text, not the center of the text. I want to change the primitive that I use so that it properly locates the anchor relative to the text, after the bounding rect is calculated by the rendering code, before the new location is used.

This code was well written and thought out. However,..

If I derive a class from InvariantTextPrimitive, I cannot override the "get" from the BoundingBox property. The compiler says that it is not marked virtual, abstract, or overridde. I am building against 1.3 binaries, which appears to be a bit different from the top of the SVN tree. So I fetched the source for 1.3 and behold it was indeed not a virtual/overrideable property. So I copied and pasted the code to a new class of my own - TopLeftCalloutPrimitive. With all the necessary using statements, it compiles. But the rendering code does not know anything about my primitive, and it never gets called at rendering.

Does anyone have any ideas on how to insert my primitive into the framework with minimal changes?

 

 

You are not authorized to post a reply.

Active Forums 4.1
Copyright 2012 ClearCanvas Inc.