.m_Height = 0.0;
75 autotearline = group.GetTearline();
78(*iter)->SetRowNum(current_row);
79(*iter)->SetTearline(tearline);
80 if(tearline > 0 && current_row > tearline) {
81(*iter)->SetVisible(
false);
83(*iter)->SetTop(
bound.m_Height);
84 if((*iter)->GetHeight() < 0.0001)
continue;
88right =
max(right, (*iter)->GetRight());
109 bound.m_Height = 0.0;
110 bound.m_Width = 0.0;
112 if(
objects.empty())
return;
114 bound.m_X = DBL_MAX;
119 boolside_labeling =
objects.front()->HasSideLabel();
131 boolside_labeling)
const 140max_h =
max(max_h, (*iter)->GetHeight());
145THitCounts::iterator at_iter = counts.find(
f);
146 if(at_iter != counts.end()) {
147at_iter->second += 1;
151at_iter = counts.find(
t);
152 if(at_iter != counts.end()) {
153at_iter->second -= 1;
161 if( !counts.empty() ) {
163THitCounts::const_iterator s_iter = counts.begin();
164THitCounts::const_iterator e_iter = s_iter;
166 while(e_iter != counts.end()) {
167 cnt+= e_iter->second;
169t_counts[s_iter->first] = 1;
170t_counts[e_iter->first] = 0;
177counts.swap(t_counts);
183TObjectList::iterator pre_i =
objects.end();
187 if( !counts.empty() ) {
194 boolhide_label =
false;
195 if(pre_i !=
objects.end() && (*pre_i)->GetRight() >
l) {
198 if(!hide_label &&
l< ll) {
199THitCounts::iterator i1 = counts.upper_bound(
l);
200THitCounts::iterator i2 = counts.upper_bound(ll);
205 if(i1->second == 1) hide_label =
true;
208 if(!hide_label &&
r> rr) {
209THitCounts::iterator i1 = counts.upper_bound(
r);
210THitCounts::iterator i2 = counts.upper_bound(rr);
215 if(i1->second == 1) hide_label =
true;
233 boolside_labeling)
const 235 typedefvector<TSeqPos> TRows;
238vector<TModelUnit> row_height;
245 for(; curr < rows.size(); ++curr) {
246 if(rows[curr] < range.
GetFrom()) {
252 if(curr < rows.size()) {
253layout[curr].push_back(*iter);
254rows[curr] = range.
GetTo();
255row_height[curr] =
max(row_height[curr], h);
257rows.push_back(range.
GetTo());
259 row.push_back(*iter);
260layout.push_back(
row);
261row_height.push_back(h);
267 for(
size_t row= 0;
row< layout.size(); ++
row) {
271 bound.m_Height += row_vert_space;
273 bound.m_Height += row_height[
row];
275TLayoutRow::iterator end_i = layout[
row].end();
276TLayoutRow::iterator pre_i = end_i;
277TLayoutRow::iterator iter = layout[
row].begin();
278 while(iter != end_i) {
283TLayoutRow::iterator next_i = iter;
292 boolhide_label =
false;
294 if(pre_i != layout[
row].end() && (*pre_i)->GetRight() >
l) {
299 if(next_i != layout[
row].end() && (*next_i)->GetRange().GetFrom() <
r) {
305 if(pre_i != layout[
row].end()) {
306 TSeqRangeprev_range = (*pre_i)->GetRange();
310 if(next_i != layout[
row].end()) {
311 TSeqRangenext_range = (*next_i)->GetRange();
339 bound.m_Height = 0.0;
340 bound.m_Width = 0.0;
342 if(
objects.empty())
return;
344 bound.m_X = DBL_MAX;
347 if((*iter)->GetHeight() < 0.0001)
continue;
348 bound.m_Height =
max((*iter)->GetHeight(),
bound.m_Height);
351right =
max(right, (*iter)->GetRight());
void x_BuildLayoutMultiRows(TObjectList &objects, SBoundingBox &bound, bool side_labeling) const
void x_BuildLayout1Row(TObjectList &objects, SBoundingBox &bound, bool side_labeling) const
virtual void BuildLayout(CLayoutGroup &group, SBoundingBox &bound) const
CInlineLayout.
CLayoutGroup is a container of CSeqGlyphs (layout objects).
ILayoutPolicy::TObjectList TObjectList
virtual void BuildLayout(CLayoutGroup &group, SBoundingBox &bound) const
COverlayLayout.
class CSeqGlyph defines an interface that wraps a rectilinear abstract object.
virtual void SetHideLabel(bool)
Force to hide label.
virtual TModelUnit GetRight() const
virtual TSeqRange GetRange(void) const
get the total range of this object.
virtual TModelUnit GetHeight() const
virtual void Update(bool)
Update content and layout including the bounding box.
virtual void SetTop(TModelUnit b)
void SetNeighbours(ENeighbours neighbours)
virtual TModelUnit GetLeft() const
TSortingMethod m_SortingType
@ eSort_BySeqPos
seq start position
@ eSort_BySeqSize
sequence length
virtual void BuildLayout(CLayoutGroup &group, SBoundingBox &bound) const
CSimpleLayout.
vector< TLayoutRow > TLayout
list< CRef< CSeqGlyph > > TObjectList
vector< CRef< CSeqGlyph > > TLayoutRow
unsigned int TSeqPos
Type for sequence locations and lengths.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
bool AbuttingWith(const TThisType &r) const
position_type GetToOpen(void) const
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
TTo GetTo(void) const
Get the To member data.
TFrom GetFrom(void) const
Get the From member data.
T bound(T x_, T xlo_, T xhi_)
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
static SLJIT_INLINE sljit_ins l(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
#define row(bind, expected)
static bool s_CompareCRefs(const CRef< CSeqGlyph > &ref_obj1, const CRef< CSeqGlyph > &ref_obj2)
static bool s_CompareCRefs(const CRef< CSeqGlyph > &ref_obj1, const CRef< CSeqGlyph > &ref_obj2)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4