Esempio n. 1
0
void RegExp::operator=(const StrPP& s)
{
  reExpression = s;

  if(reExpression() != "")
    MakePattern();
}
Esempio n. 2
0
RegExp::RegExp(const StrPP& s)
{
  reExpression = s;

  if(reExpression() != "")
    MakePattern();
}
Esempio n. 3
0
void RegExp::operator=(const char* p)
{
  reExpression = p;

  if(reExpression() != "")
    MakePattern();
}
Esempio n. 4
0
void Segment::Reconfig (Painter* output) {
    register int i;

    for (i = 0; i <= fullFade; i++) {
	Painter* p = new Painter(output);
	p->SetPattern(MakePattern(myPatSeed[i]));
	fadePainter[i] = p;
    }
}
/*  ____________________________________________________________________
	zoom()

	Resizes bitmaps while resampling them.
	Returns -1 if error, 0 if success.
*/
void AVDMVideoStreamResize::precompute(Image * dst, Image * src,
				       uint8_t algo)
//____________________________________________________________________
{

#define FREE_USED(x) if(x) { delete [] x;x=NULL;}
	FREE_USED(Hpattern_luma);
	FREE_USED(Hpattern_chroma);
	FREE_USED(Vpattern_luma);
	FREE_USED(Vpattern_chroma);
	
#ifdef SLOW	 
	#define MakePattern GetResamplingPattern
#else
	#define MakePattern GetResamplingPatternFIR4
#endif

    Hpattern_luma = MakePattern(src->width,  dst->width, &RFuncs[algo]);
    Hpattern_chroma =MakePattern(src->width >> 1,  dst->width >> 1, &RFuncs[algo]);
    Vpattern_luma =MakePattern(src->height,  dst->height,&RFuncs[algo]);
    Vpattern_chroma =MakePattern(src->height >> 1,   dst->height >> 1, &RFuncs[algo]);


}
Esempio n. 6
0
std::array<Eigen::MatrixXi, 4> MakePatternGroup(int r, int c, uint32_t seed)
{
  return FillGroup(MakePattern(r, c, seed));
}
Esempio n. 7
0
/*************************************************************************
 *
 *N  draw_face_row
 *
 *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 *
 *   Purpose:
 *P
 *     This function draws the specified face from the given row of
 *     the given face table.
 *     It is complicated by the fact that it checks to see whether a
 *     face has wrapped around the screen due to projection effects.
 *     If so, it first adjusts the coordinates off the right edge of the
 *     screen to fill that portion of the face.  Then, if the face
 *     wraps around to the other edge of the screen, it adjusts the
 *     coordinates to the left edge of the screen and refills to
 *     display that portion of the face.
 *E
 *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 *
 *   Parameters:
 *A
 *     row       <input>==(row_type) row of the specified face table.
 *     facetable <input>==(vpf_table_type) VPF face primitive table.
 *     ringtable <input>==(vpf_table_type) VPF ring primitive table.
 *     edgetable <input>==(vpf_table_type) VPF edge primitive table.
 *     fbr       <input>==(vpf_table_type) VPF face bounding rectangle table.
 *     outline   <input>==(color_type) outline color.
 *     c1        <input>==(color_type) 1st color in the fill pattern.
 *     c2        <input>==(color_type) 2nd color in the fill pattern.
 *     c3        <input>==(color_type) 3rd color in the fill pattern.
 *     c4        <input>==(color_type) 4th color in the fill pattern.
 *E
 *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 *
 *   History:
 *H
 *    Barry Michaels   May 1991                           DOS Turbo C
 *E
 *************************************************************************/
void draw_face_row( row_type row,
		vpf_table_type facetable,
		vpf_table_type ringtable,
		vpf_table_type edgetable,
		vpf_table_type fbr,
		color_type outline,
		color_type c1,
		color_type c2,
		color_type c3,
		color_type c4 )
{
   ossim_int32 count;
   int  spx1,spy1,spx2,spy2,  rowid,ring;
   extent_type shade_box;
   Pattern  pattern;
   face_rec_type face_rec;
   int wrap, mbrx2;
   row_type fbrrow;
   int XMIN_,YMIN_,XMAX_,YMAX_;

   rowid = table_pos( "ID", facetable );
   ring = table_pos( "RING_PTR", facetable );
   get_table_element( rowid, row, facetable, &(face_rec.id), &count );
   get_table_element( ring, row, facetable, &(face_rec.ring), &count );

   gpsetlinecolor(outline);
   gpsetlinestyle(SOLID_LINE);
   gpsetlinewidth(NORM_WIDTH);

   wrap = 0;

   if (gpgetdevice()==SCREEN) {
      pattern = MakePattern(c1,c2,c3,c4);

      /* Read bounding box */
      fbrrow = read_row( face_rec.id, fbr );
      XMIN_ = table_pos( "XMIN", fbr );
      YMIN_ = table_pos( "YMIN", fbr );
      XMAX_ = table_pos( "XMAX", fbr );
      YMAX_ = table_pos( "YMAX", fbr );
      get_table_element(XMIN_,fbrrow,fbr,&shade_box.x1,&count);
      get_table_element(YMIN_,fbrrow,fbr,&shade_box.y1,&count);
      get_table_element(XMAX_,fbrrow,fbr,&shade_box.x2,&count);
      get_table_element(YMAX_,fbrrow,fbr,&shade_box.y2,&count);
      free_row(fbrrow,fbr);

      screen_bounds(shade_box.x1,shade_box.y1,
		 shade_box.x2,shade_box.y2,
		 &spx1,&spy1,&spx2,&spy2);
      mbrx2 = spx2;
      if (spx2<spx1) {
	 /* The face wraps around the screen */
	 /* (or at least wraps off the edge of the screen) */
	 wrap = gpgetmaxx();
	 if (spx2 < 0) wrap -= spx2;
	 /* Adjust the maximum screen value */
	 spx2 += wrap;
      }

   } else {
      gpstartpoly();
   }

   draw_polygon( spx1,spy1,spx2,spy2, face_rec, ringtable,
		 edgetable, outline, pattern, wrap );

   if (wrap && mbrx2 > 0) {
      /* The polygon has wrapped around to the other side of the */
      /* screen.  Must redraw the part left off on the first pass. */

      if (gpgetdevice()==SCREEN) {

	 spx1 -= wrap;
	 spx2 -= wrap;

      } else {
	 gpstartpoly();
      }

      wrap *= -1;
      draw_polygon( spx1,spy1,spx2,spy2, face_rec, ringtable,
		    edgetable, outline, pattern, wrap );

   }

}
Esempio n. 8
0
Filter::Filter(const std::string& text, MatchType::type matchType, FilterType::type filterType, COLORREF bgColor, COLORREF fgColor, bool enable, int matchCount) :
	text(text), re(MakePattern(matchType, text), std::regex_constants::icase | std::regex_constants::optimize), matchType(matchType), filterType(filterType), bgColor(bgColor), fgColor(fgColor), enable(enable), matchCount(matchCount)
{
}